By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,082 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

comments

P: n/a
Anyone know how to comment out a whole section in VBA rather than just
line by line with a " ' "?

Jun 8 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
There are toolbar buttons for Comment Block and Uncomment Block.
Select the text, and click the button.

If you don't see them, right-click the space to the right of the toolbars,
and open the Edit toolbar. You can customize the toolbar, and copy the
bottons to the standard toolbar if you like (Ctrl+drag them.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"colmkav" <co******@yahoo.co.ukwrote in message
news:11**********************@n4g2000hsb.googlegro ups.com...
Anyone know how to comment out a whole section in VBA rather than just
line by line with a " ' "?
Jun 8 '07 #2

P: n/a
colmkav wrote:
Anyone know how to comment out a whole section in VBA rather than just
line by line with a " ' "?
If the code is acceptable (won't break because some control doesn't
exist, etc), I sometimes to
If 1 = 2 then
....existing coe
Endif

The code will never fire until the day 1 = 2.
Jun 8 '07 #3

P: n/a
On 8 Jun, 16:53, salad <o...@vinegar.comwrote:
colmkav wrote:
Anyone know how to comment out a whole section in VBA rather than just
line by line with a " ' "?

If the code is acceptable (won't break because some control doesn't
exist, etc), I sometimes to
If 1 = 2 then
....existing coe
Endif

The code will never fire until the day 1 = 2.
Thanks, think Id prefer the first option. The second option might
confuse any programers that try and read my code.

Jun 12 '07 #4

P: n/a
colmkav wrote:
On 8 Jun, 16:53, salad <o...@vinegar.comwrote:
>>colmkav wrote:
>>>Anyone know how to comment out a whole section in VBA rather than just
line by line with a " ' "?

If the code is acceptable (won't break because some control doesn't
exist, etc), I sometimes to
If 1 = 2 then
....existing coe
Endif

The code will never fire until the day 1 = 2.


Thanks, think Id prefer the first option. The second option might
confuse any programers that try and read my code.
When I do that, I usually put a line like
'CHANGE
right above with a comment. It makes it easy to search my code for the
word CHANGE or If 1 = 2. Much easier to search for than a '

Allen's method is probably what most others would use.
Jun 14 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.