close

If im not wrong there is a way to comment out a selection in VB with
some key storke. what is that keystorke?--
MC82
------------------------------------------------------------------------
MC82's Profile: www.excelforum.com/member.php...oamp;userid=18682
View this thread: www.excelforum.com/showthread...hreadid=503505Ordinary old apostrophe does the trick

Sub text()
' this line will not be executed
this line will be executed
End SubGord Dibben MS Excel MVP

On Fri, 20 Jan 2006 15:07:41 -0600, MC82
gt; wrote:

gt;
gt;If im not wrong there is a way to comment out a selection in VB with
gt;some key storke. what is that keystorke?Anything after an apostrophe on a line is considered a comment.

For instance:

' This is a comment

A = B ' Comment starts here
I thought there was a key stroke to comment out selected code.

Ie. If I highlight rows 1-5, then press some keystroke. Rows 1-5 will
automatically have a ' infront of it.

I guess I might be wrong, but I could have sworn I saw a ex-coworker do
it.--
MC82
------------------------------------------------------------------------
MC82's Profile: www.excelforum.com/member.php...oamp;userid=18682
View this thread: www.excelforum.com/showthread...hreadid=503505There is a button in the Edit toolbar (which of course you can include in
your standard toolbar) that does just that

--
Kind regards,

Niek Otten

quot;MC82quot; gt; wrote in message
...
gt;
gt; I thought there was a key stroke to comment out selected code.
gt;
gt; Ie. If I highlight rows 1-5, then press some keystroke. Rows 1-5 will
gt; automatically have a ' infront of it.
gt;
gt; I guess I might be wrong, but I could have sworn I saw a ex-coworker do
gt; it.
gt;
gt;
gt; --
gt; MC82
gt; ------------------------------------------------------------------------
gt; MC82's Profile:
gt; www.excelforum.com/member.php...oamp;userid=18682
gt; View this thread: www.excelforum.com/showthread...hreadid=503505
gt;

Thanks thats exactly what I was looking for, just wished I could find
out the keystroke, but that works for now. Thanks a bunch--
MC82
------------------------------------------------------------------------
MC82's Profile: www.excelforum.com/member.php...oamp;userid=18682
View this thread: www.excelforum.com/showthread...hreadid=503505

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()