473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

comments

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

Jun 8 '07 #1
4 2265
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sims | last post by:
Hi, I proud myself in having good comments, (/**/, // etc...), all over my scripts as well as a very descriptive section at the beginning of the script. No correct me if i am wrong but php must...
17
by: lkrubner | last post by:
I've got a PHP application that's 2 megs in size. Of that, my guess is 200k-400k is comments. Do they impose a performance hit? I've been postponing any kind of optimization, but at some point I'll...
4
by: Uwe Ziegenhagen | last post by:
Hello, my fellows and me implement a c++ tool that is able to divide blank/tab separated files into <number>, <text>, <c-singlelinecomment> and <multilinecomment>. So far it's not working bad,...
28
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found...
4
by: lorinh | last post by:
Hi Folks, I'm trying to strip C/C++ style comments (/* ... */ or // ) from source code using Python regexps. If I don't have to worry about comments embedded in strings, it seems pretty...
40
by: Edward Elliott | last post by:
At the risk of flogging a dead horse, I'm wondering why Python doesn't have any multiline comments. One can abuse triple-quotes for that purpose, but that's obviously not what it's for and doesn't...
7
by: Bob Stearns | last post by:
Several weeks ago I asked what comments I could pass to DB2 in a SELECT statement. I don't remember whether I said via PHP/ODBC. I was assured that both /* */ style comment blocks and -- comment...
98
by: tjb | last post by:
I often see code like this: /// <summary> /// Removes a node. /// </summary> /// <param name="node">The node to remove.</param> public void RemoveNode(Node node) { <...> }
40
by: jacob navia | last post by:
Recently we had poor Mr "teapot" that was horrified at the heresy of lcc-win of accepting // comments. C is a nice language, and you can do anything with it, inclusive a program that transforms...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.