Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REMOVING REMARKS 1

Status
Not open for further replies.

emarzan

Programmer
Nov 29, 2002
5
PR
How can I remove all the remarks from a Visual Basic for Excel?
 
A quick and dirty way to remove all of the comments in a code module is by pressing Ctrl+H to open the Replace dialog and

1. Enter '* (apostraphe asterisk) into the "Find:" field
2. Leave the "Replace With:" field blank (be sure that it's really empty).
3. Select "Current Module".
4. Check the "Use Pattern Matching" CheckBox
5. Press "Replace All"

WARNING: DO NOT DO THIS IF YOU HAVE USED APOSTRAPHES FOR ANYTHING ELSE IN YOUR CODE!!!!!

It might be a good idea to back-up your module before doing this!!!


Good Luck! [thumbsup2]


Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Thanks Mark!!!!!

That works fine. Now...
Can I automate this to do it with all modules?

Tks again.
Elias
 
Sorry about your name: MIKE!

Thank you again.
Elias
 
You don't need to automate it (and I would recommend that you don't). If you want to have it run for all of the modules then select "Current Project" instead of "Current Module" but . . .

Remember my WARNING!!!![/code]



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Glad I could help! Just remember to be careful though!

Seriously . . . If you use an apostraphe anywhere else in your code (like within a string) everything after that will also be deleted, and that could be catastophic!!!

Good Luck!

;-)

P.S. Thanks for the
star.gif


Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top