Thread: MsgBox
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Greg Greg is offline
external usenet poster
 
Posts: 331
Default MsgBox

While in VBE, under "Microsoft Escel Objects" you should see a list of your
sheets and one called "This Workbook" Double click "This Woorkbook" then
change the Object drop down (located in the top left of the module pane)
from "(General)" to "Workbook" Excell will put:
Private Sub Workbook_Open()

End Sub
in the module window by default. Then just add your Msgbox code so it looks
like
Private Sub Workbook_Open()
MsgBox "Date fields must be filled in prior to creating new report."
End Sub

Save, exit, and reload.

Greg

"TGalin" wrote:

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