Text return in a MsgBox

  • Thread starter Thread starter easy
  • Start date Start date
E

easy

How do I create a text return or a new line of text in a VBA MsgBox?
Is it possible to display a bulleted list on a msgBox?
 
Sub bulletmsg()
MsgBox ( _
Chr(149) & " This is the first item." _
& vbCrLf & Chr(149) & " This is the second item." _
& vbCrLf & Chr(149) & " This is the third item." _
)
End Sub

CHR(149) inserts a bullet character
vbCrLF inserts a line feed.

- John
www.JohnMichl.com
 
How do I create a text return or a new line of text in a VBA MsgBox?

You can't, but you can use InputBox instead.

If you just need to get a user response:

If MsgBox("Continue?", vbYesNo, "About to format your hard drive") = vbYes Then
' Proceed
Else
Exit Sub
End If
 

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

Back
Top