This may be a silly queston but is their to comment out large sections of code without having to put a ' on every line? There must be something similar to C's /* */ style?
Thanks in advance
If you end a line with a space and an underscore VBA will continue the command (including a comment) to the next line. You can make your comment as many lines long as you want that way. Of course, if you are commenting out a block of code this method will be no easier than putting an apostrophe at the beginning of each line. One trick I use sometimes is to make running the code dependant on something rediculous like:
I have found the Code Comment Builder Wizard on Dev Ashish's site to be invaluable. It lets you block a section of code and comment it all at once. You can find it at:
Thanks for that web site! I used to have it as part of my favorites and then our zone moved us to Windows 2K promising that we would lose nothing. Well you know how that sort of promise goes!
I hadn't seen that code to block out code! Excellent!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.