When you're testing procedures, you can temporarily convert a block of VBA code to comments that will be ignored during a trial run.
Doing so manually by inserting an apostrophe before each line of code can be a real chore.
To simplify this task,
- Open any module in the Visual Basic Editor (VBE)
- Choose View >Toolbars>Edit from the menu bar to display the Edit toolbar.
- Select the lines of code that you want to turn into comments.
- Click the Comment Block button on the Edit toolbar (it's the sixth button in from the right end of the toolbar).
See all Topics