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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about commenting 1

Status
Not open for further replies.

Philly44

Programmer
Jul 17, 2001
277
CA
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
 
All I have ever seen is the ' mark... Terry M. Hoey
 
Hi!

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:

If SomeVar = 1000000 Then
your code
End If

Then Access won't run it.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Thanks for the responce I think go will your suggestion Jebry
 
Hi MarsBar!

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!!

Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top