Is it possible to comment several lines at once in VBA?

3

There is the equivalent of /**/ of c # to comment and VBA instead of using plica in each row

    'Function Prodcet30(a As Double, b As Double) As Double
    'If a = 0 Then
           ' MsgBox ("Por favor introduza o valor a")
           ' Exit Sub
           ' Exit Sub

   ' End If
         ' If b = 0 Then
            'MsgBox ("Por favor introduza o valor b")
         ' Exit Sub
    'End If
   ' Prodcet30 = a * b
   ' End Function
    
asked by anonymous 27.06.2017 / 11:32

1 answer

5

There is, but it does not work like in C #, it's a toolbar, you turn it on like this:

  • Go on display > Toolbars > Edit
  • To comment, you select the code you want to leave in comment and click the "Comment block" option.

  • Toremovethecomment,youmustselectwhereyouwanttoremoveandclickthebutton,"Remove comments from the Block".

  • 27.06.2017 / 12:47