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

Commenting out blocks of code 2

Status
Not open for further replies.

TonyJollans

Programmer
Dec 18, 2002
7,186
GB
Hi All,

Just thought some of you who don't frequent the Access fora might find this of interest.

In thread705-774732, JeremyNYC gives a simple method of block-commenting using conditional compilation as an alternative to the VBA Editor method.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Slick method! Have a star for the heads-up (and to draw attention to this thread).

Thanks!

VBAjedi [swords]
bucky.gif
 
am i not understanding the question, but isn't it simpler to just use the toolbar function?

[yinyang] Tranpkp [pc2]
 
tranpkp, say you have 20 lines of debugging code you want to comment out for production. I think it's simpler to encapsulate them with compile directives than to click 20 times the toolbar option.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Nice idea, red comment.
PHV,
you can comment block with one click using "Edit" toolbar. The items (comment and uncomment block) are available in "edit" category when you customize menu/toolbar.

combo
 
We have to learn every day. So, Thanks combo for this valuable post!


 
So am i still missing something, my edit or debug toolbars is one, of them! Has the comment / decomment buttons (look like blue indent buttons) and you can simply drag/highlight and click....actually takes one click??

[yinyang] Tranpkp [pc2]
 
Hi tranpkp,

No, you're not missing anything [smile]

Not everybody has the Edit Toolbar visible all the time. This is just another way that may be useful to some people in some circumstances.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
I remember when I first found that thing, was like a godsend, sometimes hard to keep to toolbar on there...

[yinyang] Tranpkp [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top