How to comment and uncomment blocks of code in the Office VBA Editor

后端 未结 9 772
醉酒成梦
醉酒成梦 2020-12-02 04:21

In the VBA editor of Office (ALT + F11), how do you comment or uncomment a block of code?

相关标签:
9条回答
  • 2020-12-02 04:54

    With MZ-Tools installed, I comment/uncomment blocks in VBE by using the keyboard shortcut
    Ctrl+Alt+C (MZ-Tools default)

    0 讨论(0)
  • 2020-12-02 04:55

    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.

    enter image description here

    *This is a simpler option to the ones mentioned.

    0 讨论(0)
  • 2020-12-02 04:55

    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.

    0 讨论(0)
提交回复
热议问题