Message Box - Formatting Question

  • Thread starter Thread starter Munchkin
  • Start date Start date
M

Munchkin

Below is my message box. I want the 2 sentances to be on 2 separate lines.
How to I get a return key inbetween them to do that?


MsgBox ("IF IMPORT WAS SUCCESSFUL click 'MOVE RECORD LIST TO DRIVER LIST'
to finish the import. IF THE RECORDS DID NOT IMPORT CORRECTLY click 'CANCEL
IMPORT' and start over.")
 
Try this. Note that Excel might use 2 lines for either sentence, but it will
definitely start a new line for the second sentence. Note that I removed
the parentheses. HTH Otto
MsgBox "IF IMPORT WAS SUCCESSFUL click 'MOVE RECORD LIST TO DRIVER LIST' to
finish the import." & Chr(13) & _
"IF THE RECORDS DID NOT IMPORT CORRECTLY click 'CANCEL Import ' and
start over."
 
I would do it this way. Hope this helps! If so, let me know, click 'YES'
below.

Sub Msg()

Dim Sentence1 As String
Dim Sentence2 As String

Sentence1 = "IF IMPORT WAS SUCCESSFUL click 'MOVE RECORD LIST TO DRIVER
LIST' to finish the import."
Sentence2 = "IF THE RECORDS DID NOT IMPORT CORRECTLY click 'CANCEL
Import ' and start over."

MsgBox Sentence1 & vbNewLine & vbNewLine & Sentence2

End Sub
 
Back
Top