Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Is Multi line possible with MsgBox

Is it possible to have this in multiple lines, instead of just one single line?

MsgBox "An Error as occurred in the Save file to folder. This Macro will now
TERMINATED"

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Is Multi line possible with MsgBox

On Sep 5, 4:32 pm, Ayo wrote:
Is it possible to have this in multiple lines, instead of just one single line?

MsgBox "An Error as occurred in the Save file to folder. This Macro will now
TERMINATED"


The string chr(13) will provide a carriage return. For example

MsgBox "An Error as occurred in the Save file to folder." & chr(13) &
"This Macro will now
TERMINATED"



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Is Multi line possible with MsgBox

Try

MsgBox "Line One" & vbCrLf & _
"Line Two"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Ayo" wrote in message
...
Is it possible to have this in multiple lines, instead of just one single
line?

MsgBox "An Error as occurred in the Save file to folder. This Macro will
now
TERMINATED"


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Is Multi line possible with MsgBox

example:

MsgBox "Line 1" & vbNewLine & "Line 2"


--
Hope that helps.

Vergel Adriano


"Ayo" wrote:

Is it possible to have this in multiple lines, instead of just one single line?

MsgBox "An Error as occurred in the Save file to folder. This Macro will now
TERMINATED"

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Is Multi line possible with MsgBox

Is it possible to have this in multiple lines, instead of just one single
line?

MsgBox "An Error as occurred in the Save file to folder. This Macro will
now
TERMINATED"


The string chr(13) will provide a carriage return. For example

MsgBox "An Error as occurred in the Save file to folder." & chr(13) &
"This Macro will now
TERMINATED"


Or, you can use the built-in VB constant for carriage returns, vbCr...

MsgBox "An Error as occurred in the Save file to folder." & vbCr & "This
Macro will now TERMINATED"

If you want a blank line between the sentences for visual looks reasons, use
two vbCr characters...

MsgBox "An Error as occurred in the Save file to folder." & vbCr & vbCr &
"This Macro will now TERMINATED"

Note: I'm sure your newsreader will split the above lines into more than one
line, but they are just single code lines.

Rick

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
Concatenate: Multi-Line Cell with 2 single line cells BEEJAY Excel Worksheet Functions 0 February 15th 07 08:53 PM
how can I paste multi-line/multi-paragraph data into ONE cell? Theano Excel Discussion (Misc queries) 3 June 7th 05 01:10 PM
Msgbox w/ multi-lines jt46[_2_] Excel Programming 1 October 11th 04 07:57 PM
Msgbox w/ multi-lines jt46 Excel Programming 11 October 11th 04 08:55 AM
New Line in MsgBox exceller Excel Programming 4 August 6th 04 10:46 PM


All times are GMT +1. The time now is 10:55 AM.

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"