Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Formatting in a Message Box

Is it possible to format within a message box?

I currently have a message box which does nothing more than report the
version number of a spreadsheet that the person is using.

Code:

Sub Version()
MsgBox "** You are currently using Version 2.0 of this form **
(Form is validated as New_Supplementary_Form_V6_(Template).xls
End Sub

(The code all appears on one line @ the moment).

What I would like to be able to do is force a a character return in
before (Form is....).

Is this possible?

Many Thanks, Al ( )
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Formatting in a Message Box

Hi Al

You can use Chr(10) -linefeed- or Chr(13) -carriage return- or vbNewLine
(which is a combination of them):

Sub test()
MsgBox "Hi there" & Chr(13) & "See you in" & Chr(10) & _
"row 3!" & vbNewLine & "That's it."
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Al Mackay" skrev i melding
om...
Is it possible to format within a message box?

I currently have a message box which does nothing more than report the
version number of a spreadsheet that the person is using.

Code:

Sub Version()
MsgBox "** You are currently using Version 2.0 of this form **
(Form is validated as New_Supplementary_Form_V6_(Template).xls
End Sub

(The code all appears on one line @ the moment).

What I would like to be able to do is force a a character return in
before (Form is....).

Is this possible?

Many Thanks, Al ( )



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Formatting in a Message Box

There are constants for Chr(10) and Chr(13). They are vbLf and vbCr. As well
as vbNewLine, there is also vbCrLf.

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

You can use Chr(10) -linefeed- or Chr(13) -carriage return- or vbNewLine
(which is a combination of them):

Sub test()
MsgBox "Hi there" & Chr(13) & "See you in" & Chr(10) & _
"row 3!" & vbNewLine & "That's it."
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Al Mackay" skrev i melding
om...
Is it possible to format within a message box?

I currently have a message box which does nothing more than report the
version number of a spreadsheet that the person is using.

Code:

Sub Version()
MsgBox "** You are currently using Version 2.0 of this form **
(Form is validated as New_Supplementary_Form_V6_(Template).xls
End Sub

(The code all appears on one line @ the moment).

What I would like to be able to do is force a a character return in
before (Form is....).

Is this possible?

Many Thanks, Al ( )





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
Conditional formatting with a prompt and new email message Tammy Excel Discussion (Misc queries) 1 December 21st 09 08:38 PM
Formatting error message AndruH Excel Discussion (Misc queries) 1 July 30th 08 06:10 PM
conditional formatting error message Karla V Excel Worksheet Functions 3 October 31st 06 03:37 AM
Error message when saving after formatting manxman Excel Discussion (Misc queries) 0 October 3rd 06 04:32 PM
Pivot Table not valid error message when formatting data 'button'. MDW Excel Discussion (Misc queries) 0 January 27th 05 03:01 PM


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