Quantcast
Channel: Tachytelic.net
Viewing all articles
Browse latest Browse all 210

How to comment a block of code in the Office VBA Editor

$
0
0

Being able to comment a block of code is a standard operation in any IDE, but for some reason the Microsoft Office VBA Editor does not include that functionality by default. However, the functionality is there and waiting to be used, it’s just hidden in the “Edit” toolbar which is not visible be default.

How to add the comment & uncomment buttons to the Office VBA Editor

  1. Open the VBA Editor (Alt + F11).
  2. Right click anywhere on the toolbar.
  3. Select the “Edit” Toolbar.
    Image showing how to add the "edit" toolbar in Office VBA to allow you to easily comment and uncomment blocks of code in VBA
  4. You will now be able to quickly and easily comment a block of code (or uncomment) using these new buttons on your toolbar:
    Image showing comment and uncomment buttons on VBA Toolbar
  5. Done!

 

Here is a short video showing how to enable the edit toolbar to get access to the comment and uncomment buttons:

Hope this helps!

The post How to comment a block of code in the Office VBA Editor appeared first on Tachytelic.net.


Viewing all articles
Browse latest Browse all 210

Trending Articles