Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default What does undersocre line mean

In a lot of these macros, I see an underscore "_" symbol. What does it
connote?

G


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default What does undersocre line mean

Grace,

That is a line continuation character, which is used to write one
logical line of code on several actual lines of code in the file.
It is used on long lines of code to make to make the code more
readable.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Grace" wrote in message
...
In a lot of these macros, I see an underscore "_" symbol. What

does it
connote?

G




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default What does undersocre line mean

When it's used at the end of a line it is a line-continuation character
It means that the code on that line and the line that follows i
treated as though it is on the same line. I't is for asthetic reason
as it makes code easier to read. At least it does when it is use
properly. - Piku

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default What does undersocre line mean

Grace

you can't have spaces in labels and variable names, etc. Using an
underscore is a common way of "breaking up" the variables to make them more
readable. Some people use capital letters as another option.

So, if you had a macro that you wanted to call "copy data from sheet 1 to
sheet 2" you could write:

Sub copy_data_from_sheet_1_to_sheet_2()

or

Sub Copy_Data_From_Sheet_1_To_Sheet_2()

or

Sub CopyDataFromSheet1ToSheet2()

Regards

Trevor


"Grace" wrote in message
...
In a lot of these macros, I see an underscore "_" symbol. What does it
connote?

G




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default What does undersocre line mean

Grace

You are breaking up one line of code into more than one line to make it
easier to read. So....

Range(Range("A1"), Range("A" & Rows.Count).End(xlUp)).Select

is the same as

Range(Range("A1"), _
Range("A" & Rows.Count).End(xlUp)).Select

--
XL2002
Regards

William



"Grace" wrote in message
...
| In a lot of these macros, I see an underscore "_" symbol. What does it
| connote?
|
| G
|
|




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default What does undersocre line mean

Hi G

It (a space plus an underscore) wraps a long line, meaning something like
"this is not a line break". As in

Hi _
G

One does this
1) because one can not afford a super widescreen display on a developer
salary;
2) because newsgroup postings break long lines automatically, making
copy-paste code err.

HTH. Best wishes Harald

"Grace" skrev i melding
...
In a lot of these macros, I see an underscore "_" symbol. What does it
connote?

G




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default What does undersocre line mean

Wow, I sure got a lot of help on this one. Can I ask any of you to look at
the reply I sent on "can it be done" and see if any of you can answer any
(doesn't have to be all) of that?

Thanks, _
Grace

"Harald Staff" wrote in message
...
Hi G

It (a space plus an underscore) wraps a long line, meaning something like
"this is not a line break". As in

Hi _
G

One does this
1) because one can not afford a super widescreen display on a developer
salary;
2) because newsgroup postings break long lines automatically, making
copy-paste code err.

HTH. Best wishes Harald

"Grace" skrev i melding
...
In a lot of these macros, I see an underscore "_" symbol. What does it
connote?

G






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default What does undersocre line mean

You have another reply there.

Grace wrote:

Wow, I sure got a lot of help on this one. Can I ask any of you to look at
the reply I sent on "can it be done" and see if any of you can answer any
(doesn't have to be all) of that?

Thanks, _
Grace

"Harald Staff" wrote in message
...
Hi G

It (a space plus an underscore) wraps a long line, meaning something like
"this is not a line break". As in

Hi _
G

One does this
1) because one can not afford a super widescreen display on a developer
salary;
2) because newsgroup postings break long lines automatically, making
copy-paste code err.

HTH. Best wishes Harald

"Grace" skrev i melding
...
In a lot of these macros, I see an underscore "_" symbol. What does it
connote?

G





--

Dave Peterson

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
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? No Name Excel Worksheet Functions 7 October 7th 09 11:10 AM
How to convert a dotted line to a solid line in a line graph Sharlz Charts and Charting in Excel 1 January 14th 09 04:51 AM
average Line created in an existing line graph- based on one cell Melanie Charts and Charting in Excel 2 December 27th 07 09:14 PM
Make a line in a bar chart, and change color of any bars that exceed the line MarkM Excel Discussion (Misc queries) 4 July 5th 06 04:06 PM
coloring overy other line without doing so line by line gen Excel Worksheet Functions 5 April 1st 05 10:38 PM


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