Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Module Comments

Hello,

Is there a way to insert comments in a module outside of subs and
functions that will not cause errors when running the code?

jfcby
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Module Comments

Insert a single quote sign as the first character in the comment line.

' Here's a comment

Regards,
Per

"jfcby" skrev i meddelelsen
...
Hello,

Is there a way to insert comments in a module outside of subs and
functions that will not cause errors when running the code?

jfcby


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Module Comments

Per,

Thanks for the reply.

But, when running some macros they error out using ' to comment out
lines of code.

Is that the only way to comment code in vba?

jfcby
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Module Comments

Using the ' to exclude comments will fail only if you have made a mistake
somewhere in the placement of these comments.

Perhaps you inserted a comment after a line-continuation mark(_)

Post an example of code that fails.

You can always use Rem instead of the ' but can also fail for the same
reason as above.


Gord Dibben MS Excel MVP


On Wed, 22 Apr 2009 12:31:58 -0700 (PDT), jfcby wrote:

Per,

Thanks for the reply.

But, when running some macros they error out using ' to comment out
lines of code.

Is that the only way to comment code in vba?

jfcby


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
Compile Error in Hidden Module: Module 1 Mim Excel Programming 3 January 23rd 10 12:22 AM
VBA code in one Module referencing Public Variables Declared inanother Module failing Khurram Excel Programming 5 March 11th 09 11:01 PM
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
Run worksheet module code from workbook module? keithb Excel Programming 1 August 14th 05 04:04 AM


All times are GMT +1. The time now is 12:39 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"