Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MC82
 
Posts: n/a
Default Commenting out Rows in VB


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: http://www.excelforum.com/member.php...o&userid=18682
View this thread: http://www.excelforum.com/showthread...hreadid=503505

  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Commenting out Rows in VB

Ordinary old apostrophe does the trick

Sub text()
' this line will not be executed
this line will be executed
End Sub


Gord Dibben MS Excel MVP

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


If im not wrong there is a way to comment out a selection in VB with
some key storke. what is that keystorke?


  #3   Report Post  
Posted to microsoft.public.excel.misc
Mark Lincoln
 
Posts: n/a
Default Commenting out Rows in VB

Anything after an apostrophe on a line is considered a comment.

For instance:

' This is a comment

A = B ' Comment starts here

  #4   Report Post  
Posted to microsoft.public.excel.misc
MC82
 
Posts: n/a
Default Commenting out Rows in VB


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: http://www.excelforum.com/member.php...o&userid=18682
View this thread: http://www.excelforum.com/showthread...hreadid=503505

  #5   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default Commenting out Rows in VB

There 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

"MC82" wrote in message
...

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:
http://www.excelforum.com/member.php...o&userid=18682
View this thread: http://www.excelforum.com/showthread...hreadid=503505





  #6   Report Post  
Posted to microsoft.public.excel.misc
MC82
 
Posts: n/a
Default Commenting out Rows in VB


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: http://www.excelforum.com/member.php...o&userid=18682
View this thread: http://www.excelforum.com/showthread...hreadid=503505

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rows & Columns in Excel seadragon69 Excel Worksheet Functions 2 December 7th 05 05:54 PM
Automatically inserting rows ausdiver99 Excel Worksheet Functions 1 June 2nd 05 02:15 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Insert rows Mr. G. Excel Worksheet Functions 3 March 31st 05 03:49 AM
flexible paste rows function that inserts the right number of rows marika1981 Excel Discussion (Misc queries) 1 February 18th 05 02:40 AM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"