put a new line in the middle of a dialog box string

C

Clarke

Hey everyone,
I'm writing some vb code to pop up a dialog box and ask the user if he
wants to save changes to his document, and I would like to put a new line in
the middle of my string, but I'm not sure how to write a new line in a dialog
box....

Here's my code:
strAnswer = MsgBox("AutoSave activated. Would you like to save your changes
in this document? Click Yes to save changes in the current document, No to
save changes in a different document, or Cancel saving right now.", _
vbYesNoCancel Or vbQuestion, "AutoSave")

I want this by itself:
AutoSave activated. Would you like to save your changes in this document?

And this on a different line:
Click Yes to save changes in the current document, No to save changes in a
different document, or Cancel saving right now.

And then the Yes, No, Cancel buttons beneath that.

Thanks,
 
J

Jonathan West

Hi Clarke

Try this

strAnswer = MsgBox("AutoSave activated. Would you like to save your changes
in this document?" & vbCr & "Click Yes to save changes in the current
document, No to
save changes in a different document, or Cancel saving right now.", _
vbYesNoCancel Or vbQuestion, "AutoSave")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top