I need a msg to pop up when a worksheet opens. Pretty simple:
Private Sub Workbook_Open()
If MsgBox("My msg goes here!") Then
Exit Sub
End If
End Sub
But I need to be able to have multiple lines, maybe a short paragraph.
How do you get it to allow additional lines?
Thanks!
Last edited by jzibton; 06-21-2009 at 01:25 PM.
this is how you add lines
Code:Sub test() MsgBox "My msg goes here!" & vbCrLf & "this is second line" End Sub
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
jzibton,
Try:
Code:Sub TestMessage() MsgBox "I need a msg to pop up when a worksheet opens. Pretty simple:" & vbCrLf & vbCrLf & _ "But I need to be able to have multiple lines, maybe a short paragraph." & vbCrLf & vbCrLf & _ "How do you get it to allow additional lines?" End Sub
It will create a three line message with double spacing.
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
jzibton
Please take a couple of minutes and read ALL theForum Rules then wrap your VBA code (Rule 3)
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks