making code's rows as a comment in VB

A

Alex

In C we can use something like /* ... */ for comments.
I'm just wondering whether it's possible to make several code's rows as a
comment as well in VB.
I've seen this trick through Edit/Replace but I cannot recal it.

Could anybody advise how to do it?

Thanks
 
S

Steve Huff

There is no way to comment several rows in VBA such as the /* ... */ in C and
in C++. The ' or REM is all ya got. There might be some add-in out there to
put them in for you when you hightlight a section though...

--Steve Huff
 
A

Alex

Thanks, Steve.
Could you please clarify it , how it could be done through the section
highlighting and how I could use add-in for this.
 
A

Arvin Meyer

Not sure what he's talking about. Not only can you comment several rows, but
there's a tool built into the VBA editor to do it for you. Right-click on a
tool bar while in the editor and turn on the Edit toolbar. Use the Comment
Block and Uncomment Block buttons to Comment/Uncomment the selected text.
With one click you can comment an entire module if you want to: Edit ...
Select All, then hit the Comment Block button.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
S

Steve Huff

Cool - I didn't realize that the Comment/Uncomment thing was built into the
VBA Editor In Access. I know in Access 95 I use to have a custom Add-In that
someone wrote to do the same thing.

--Steve Huff
 
B

Brendan Reynolds

I think it's a feature of the shared VBA IDE that Access first started to
use in common with VB and other Office apps in Access 2000.
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Top