Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 394
Default Commenting in Code

Hi Everyone,

I know that if you want to put a Comment Next to a Bit of Code you use
"'".
I have a Program where I have Written a Description of what the Bit of
Code Below it does. I use the "'" Before Starting my Description, But
when I Copy it into a Module it puts Speach Marks at the Beginning
which Causes an ERROR. Is it something to do with the Fact that I use
the Next Line Command ( Alt & ENTER ) in the Excel Cell which I am
Commenting.
Thanks in Advance.

All the Best
Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Commenting in Code

hi,
try using just ' instead of "'".

-----Original Message-----
Hi Everyone,

I know that if you want to put a Comment Next to a Bit of

Code you use
"'".
I have a Program where I have Written a Description of

what the Bit of
Code Below it does. I use the "'" Before Starting my

Description, But
when I Copy it into a Module it puts Speach Marks at the

Beginning
which Causes an ERROR. Is it something to do with the

Fact that I use
the Next Line Command ( Alt & ENTER ) in the Excel Cell

which I am
Commenting.
Thanks in Advance.

All the Best
Paul
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Commenting in Code

Hi Paul
use the apostophe for this: '

--
Regards
Frank Kabel
Frankfurt, Germany

"Paul Black" schrieb im Newsbeitrag
...
Hi Everyone,

I know that if you want to put a Comment Next to a Bit of Code you

use
"'".
I have a Program where I have Written a Description of what the Bit

of
Code Below it does. I use the "'" Before Starting my Description, But
when I Copy it into a Module it puts Speach Marks at the Beginning
which Causes an ERROR. Is it something to do with the Fact that I use
the Next Line Command ( Alt & ENTER ) in the Excel Cell which I am
Commenting.
Thanks in Advance.

All the Best
Paul


  #4   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Commenting in Code

Hi Paul:

Try :
' This is the first line of my comment _
' This is the second

Good Luck
TK

"Paul Black" wrote:

Hi Everyone,

I know that if you want to put a Comment Next to a Bit of Code you use
"'".
I have a Program where I have Written a Description of what the Bit of
Code Below it does. I use the "'" Before Starting my Description, But
when I Copy it into a Module it puts Speach Marks at the Beginning
which Causes an ERROR. Is it something to do with the Fact that I use
the Next Line Command ( Alt & ENTER ) in the Excel Cell which I am
Commenting.
Thanks in Advance.

All the Best
Paul

  #5   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Commenting in Code

Hi Paul:

Sorrow about the typo
' This is the first line of my comment
' This is the second

Use the underscore to break code into two lines

This is the first line of my code _
This is the second

Good Luck
TK

"TK" wrote:

Hi Paul:

Try :
' This is the first line of my comment _
' This is the second

Good Luck
TK

"Paul Black" wrote:

Hi Everyone,

I know that if you want to put a Comment Next to a Bit of Code you use
"'".
I have a Program where I have Written a Description of what the Bit of
Code Below it does. I use the "'" Before Starting my Description, But
when I Copy it into a Module it puts Speach Marks at the Beginning
which Causes an ERROR. Is it something to do with the Fact that I use
the Next Line Command ( Alt & ENTER ) in the Excel Cell which I am
Commenting.
Thanks in Advance.

All the Best
Paul



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Commenting in Code

the single quote only mark from that point to the end of the line as a
comment. for multiline comments, each line has to start with a single
quote.

' * * * * * * * * * * * *
' DESCRIPTION
'
' line 1
' line 2
' line 3
' * * * * * * * * * * * *

--
Regards,
Tom Ogilvy


"Paul Black" wrote in message
...
Hi Everyone,

I know that if you want to put a Comment Next to a Bit of Code you use
"'".
I have a Program where I have Written a Description of what the Bit of
Code Below it does. I use the "'" Before Starting my Description, But
when I Copy it into a Module it puts Speach Marks at the Beginning
which Causes an ERROR. Is it something to do with the Fact that I use
the Next Line Command ( Alt & ENTER ) in the Excel Cell which I am
Commenting.
Thanks in Advance.

All the Best
Paul



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 394
Default Commenting in Code

Thanks Everyone for your Answers.
I was just using the ', I put it in Speach Marks for the Purpose of
this Post.
I have the Code in an Excel Spreadsheet and then Copy it into the
Editor. Some of the Comments Appear to be on 4 or 5 Lines in a Single
Excel Cell Because I have Used the New Line Command in Excel ( Alt +
Enter ) while Writing the Descriptions. I think that it is this that
when I Copy it into the Editor it puts a Speach Mark at the Beginning
Causing the Line to Turn Red.

In a Single Excel Cell it Looks like this :-
' Start of Comments
' Next Line
' Next Line etc

But in the Editor it Looks like this :-
" ' Start of Comments
' Next Line
' Next Line etc

I Just Wondered if there was a way Round this Instead of putting the
Comments on Several Lines in Excel.

Thanks in Advance
Paul
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Commenting in Code

I'm confused as to what you actually want.

Comments in the VB Editor can use line continuations.

eg.
' This is line 1 _
Comment of line 2 _
Last line of the same comment


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Paul Black" wrote in message
...
Thanks Everyone for your Answers.
I was just using the ', I put it in Speach Marks for the Purpose of
this Post.
I have the Code in an Excel Spreadsheet and then Copy it into the
Editor. Some of the Comments Appear to be on 4 or 5 Lines in a Single
Excel Cell Because I have Used the New Line Command in Excel ( Alt +
Enter ) while Writing the Descriptions. I think that it is this that
when I Copy it into the Editor it puts a Speach Mark at the Beginning
Causing the Line to Turn Red.

In a Single Excel Cell it Looks like this :-
' Start of Comments
' Next Line
' Next Line etc

But in the Editor it Looks like this :-
" ' Start of Comments
' Next Line
' Next Line etc

I Just Wondered if there was a way Round this Instead of putting the
Comments on Several Lines in Excel.

Thanks in Advance
Paul



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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Commenting out code Jeff Excel Discussion (Misc queries) 2 January 31st 07 07:18 PM
Commenting out Rows in VB MC82 Excel Discussion (Misc queries) 5 January 20th 06 11:36 PM
Better Excel commenting SteveT Excel Discussion (Misc queries) 1 August 16th 05 02:55 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 12:27 PM.

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

About Us

"It's about Microsoft Excel"