Thread: MsgBox
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default MsgBox

Not a macro, rather, event code. Here is how to implement it. Right click
the icon immediately to the *left* of the File menu item and select View
Code from the popup menu that appears; then, copy/paste this code into the
code window the opened up...

Private Sub Workbook_Open()
MsgBox "Your message goes here"
End Sub

Note... if when the code window opens up, there is already a Workbook_Open
procedure showing, then just put the MsgBox statement above in it (don't
repeat the Sub..End Sub parts). Now, if you save the workbook, you will get
your message to display (assuming the user permits macros to run) the next
time the workbook is opened.

--
Rick (MVP - Excel)


"TGalin" wrote in message
...
I know the macro below will give me a message when I run it based on the
message I put between the quotations. I am wondering is there a macro
that
will get a message box to pop up when I am open the workbook?

Sub MsgBox
Msgbox "type you're message here" will give me a message boc
End