View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How can I program a message box to open when a user opens and exc.

Private Sub Workbook_Open()
msgbox "Please note this file is good for . . . "
End Sub

go into the VBE and go to the Thisworkbook entry in the Project explorer.
double click on this an you will get the code module for Workbook level
events. In the left dropdown as the top choose Workbook and from the right
choose Open. Add the line for the message box.

http://ww.cpearson.com/excel/events.htm Chip Pearson's page on events.

--
Regards,
Tom Ogilvy

"Marcus" wrote in message
...
How can I program a message box to open when a user opens and excell file.

Ie. When a user selects to open a file a command box opens with the messge
"Please note this file is good for ..." wtc. The user then clicks ok to
continue to the opened work book.