Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Same code, different line

How do you continue the same line of code on a new line?
Basically instead of having one long line where you would
need to scroll horizontally to see the end, you can have
it spread over a number of lines and only scroll
vertically.

Thanks for your speedy response.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Same code, different line

Hello Neil,

Code line can be devided by _.
(a space and underbar)

eg.


Code:
--------------------

MyVariable = _
"A" & _
"B" & _
"C"

--------------------



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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Same code, different line

"Neil" wrote in message
...
How do you continue the same line of code on a new line?
Basically instead of having one long line where you would
need to scroll horizontally to see the end, you can have
it spread over a number of lines and only scroll
vertically.

Thanks for your speedy response.


It's done using undersco

ActiveWindow.Selection.SlideRange.Shapes _
.AddShape(msoShapeRectangle, 246, _
288, 138, 132).Select



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Same code, different line

Neil,

Your character is the underscore.
Be aware, it must be at the end of the line, must be after a space and you
there is a limit to the number of "line continuations" you're allowed.

Sub testit()
Dim strMyValue As String

strMyValue = _
"How do you continue the same line of code on a new line? " &
vbNewLine & _
"Basically instead of having one long line where you would" &
vbNewLine & _
"need to scroll horizontally to see the end, you can have" &
vbNewLine & _
"it spread over a number of lines and only scroll" & _
"vertically."

MsgBox strMyValue

End Sub


"Neil" wrote in message
...
How do you continue the same line of code on a new line?
Basically instead of having one long line where you would
need to scroll horizontally to see the end, you can have
it spread over a number of lines and only scroll
vertically.

Thanks for your speedy response.



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
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
modify a line code TUNGANA KURMA RAJU Excel Discussion (Misc queries) 6 June 3rd 08 12:31 PM
code line with two conditions TUNGANA KURMA RAJU Excel Discussion (Misc queries) 3 March 16th 07 11:05 AM
line code modification TUNGANA KURMA RAJU Excel Discussion (Misc queries) 3 March 2nd 07 01:12 PM
What's wrong with this line of code? Sandy[_3_] Excel Programming 0 July 23rd 03 12:15 PM


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