msgbox on workbook open

  • Thread starter Thread starter Thrava
  • Start date Start date
T

Thrava

Hi group,

What would be the vb code to have a message box with a
vbonly button to pop up when the workbook is first opened?

Thanks
Thrava
 
Hi Thrava
put the following code in your workbook module

Private Sub Workbook_Open()
Dim ret
ret = MsgBox("hallo", vbOKOnly)
End Sub
 
Thank you very much for this Frank
Thrava

-----Original Message-----
Hi Thrava
put the following code in your workbook module

Private Sub Workbook_Open()
Dim ret
ret = MsgBox("hallo", vbOKOnly)
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

.
 
Hi Again Frank,
I've posted it in a module, but I don't see any
messagebox? appearing upon lunch !
 
Hi
you have to put this in the workbook module. To get there try the
following
- open the VBA editor
- double-click on 'Thisworkbook' in the left explorer window for your
project
- paste the code in this module
 
Hi
this is a workbook event procedure. This has to be stored in the
workbook module. Quite similar worksheet event procedures (e.g.
worksheet_change) have to be placed in the respective worksheet
modules.
You may have a look at
http://www.cpearson.com/excel/events.htm
for more information
 
Thank you Frank
Thrava
-----Original Message-----
Hi
this is a workbook event procedure. This has to be stored in the
workbook module. Quite similar worksheet event procedures (e.g.
worksheet_change) have to be placed in the respective worksheet
modules.
You may have a look at
http://www.cpearson.com/excel/events.htm
for more information

--
Regards
Frank Kabel
Frankfurt, Germany
window for
your

.
 
Back
Top