Separate lines in Msg Box

mkdrep

Registered User.
Local time
Yesterday, 22:18
Joined
Feb 6, 2014
Messages
181
I have attached a Msg Box that pops up the way I want it to in my program, with one exception. Is there anyway to have "Do you want to continue?" be shown on a third line? Here is the code line that handles the actual Message:

Msg = ("ATTENTION: The Next Form Which Opens Allows Editing of Product Information. Any Changes Made CAN NOT BE REVERSED! Do you want to continue?")

Thank you! :)
 

Attachments

  • Edit-Cust-MsgBox.jpg
    Edit-Cust-MsgBox.jpg
    20.1 KB · Views: 70
Msg = "Blah blah " & vbCrLf & "this will be on the next line"
 
Try . . .

Code:
Msg = _
"ATTENTION: The Next Form Which Opens Allows Editing of Product Information. " & _
"Any Changes Made CAN NOT BE REVERSED!" & _
vbCrLf & vbCrLf & _
"Do you want to continue?"
See the two VBA Carriage-Return-Line-Feed characters?
Cheers,
 
Happy to help!
 
and you can add various icons and a title, and even make the default answer "no"

Code:
 result = msgbox("ATTENTION: The Next Form Which Opens Allows " & _
  "Editing of Product Information. Any Changes Made CAN NOT BE REVERSED! " & vbcrlf & vbcrlf & _
 "Do you want to continue?", vbquestion+vbyesno+vbdefaultbutton2,"Continue?")
 

Users who are viewing this thread

Back
Top Bottom