Multiline Comments

aman

Registered User.
Local time
Today, 07:32
Joined
Oct 16, 2008
Messages
1,251
Hi All

Can anyone please tell me how can I do multiline comments in VBA code.I know how to do single line comments with ' sign. but I am not sure whether multiline comments can be possible in VBA .As in VB ,we use /* and */ to comment multiple lines.

Thanks in advance
Aman
 
I belive an underscore at the end of the line is what you are looking for.

' My comment _
still my comment _
 
HI janr

My question is to comment multiple lines at once ..e,g

abc
xyz
pqr
stf

now if i want to comment these four lines in VBA,then I use colon sogn i.e ' sign in front of each line.But what I am looking for is 'to comment these four lines without putting ' sign infront of each line again and again...

I hope it will explain you my problem..

Thanks
 
As Janr told you just put an _ at the end of each line except the last one and VBA will interpret it as a comment so with your example

' abc _
xyz _
pqr_
stf

VBA will treat these 4 lines as comment.

VBA does not support the /* */ format
 

Users who are viewing this thread

Back
Top Bottom