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

Asked

Viewed 27,154 times

5

There is the equivalent of /**/ of to comment on instead of using plicas on each line

    '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

1 answer

7


It exists, but it doesn’t work like in C#, it’s a toolbar, you activate it like this:

  1. Go to view > Toolbars > Edit

inserir a descrição da imagem aqui

  1. To comment, you select the code you want to leave in comment and click on the option, "Comment block". inserir a descrição da imagem aqui

  2. To remove the comment, you need to select where you want to remove and click the button, "Remove Block Comments". inserir a descrição da imagem aqui

  • 1

    I never knew... Show!! Thanks

Browser other questions tagged

You are not signed in. Login or sign up in order to post.