Steps to comment / uncommented
Press alt + f11/ Developer tab visual basic editor view tab - toolbar - edit - comments.
&
) to the beginning of the entry. Or just click View, ToolBars, Edit. Then you can select a block of code and then click the Comment or Uncomment toolbar button to do everything in one click.
As an aside, you can Tab/Shift+Tab a block of selected text also. When I was a noobie, I didn't know that for a long time and would do them one line at a time.
Good Luck!
Have you checked MZTools?? It does a lot of cool stuff...
If I'm not wrong, one of the functionalities it offers is to set your own shortcuts.
After adding the icon to the toolbar and when modifying the selected icon, the ampersand in the name input is specifying that the next character is the character used along with Alt for the shortcut. Since you must select a display option from the Modify Selection drop down menu that includes displaying the text, you could also write &C in the name field and get the same result as &Comment Block (without the lengthy text).
There is a built-in Edit toolbar in the VBA editor that has the Comment Block and Uncomment Block buttons by default, and other useful tools.
If you right-click any toolbar or menu (or go to the View menu > Toolbars), you will see a list of available toolbars (above the "Customize..." option). The Standard toolbar is selected by default. Select the Edit toolbar and the new toolbar will appear, with the Comment Block buttons in the middle.
*This is a simpler option to the ones mentioned.
An easy way to add buttons to Comment
or Un-Comment
a code block is:
With MZ-Tools installed, I comment/uncomment blocks in VBE by using the keyboard shortcut
Ctrl+Alt+C (MZ-Tools default)
Source: Stackoverflow.com