Does VBA contain a comment block syntax?

Tim.DeVries picture Tim.DeVries · Jun 2, 2014 · Viewed 105.8k times · Source

In VBA is there a short way to comment out a block of code the same way java uses /*...*/?

Answer

LimaNightHawk picture LimaNightHawk · Jun 2, 2014

Although there isn't a syntax, you can still get close by using the built-in block comment buttons:

If you're not viewing the Edit toolbar already, right-click on the toolbar and enable the Edit toolbar:

enter image description here

Then, select a block of code and hit the "Comment Block" button; or if it's already commented out, use the "Uncomment Block" button:

enter image description here

Fast and easy!