message box does not show

M

Marilyn

Hello this is my message box
Sub Form23()
Dim Msg As String
Msg = "Complete Attached Form " & vbCrLf
Msg = Msg & "Submit Invoice" & vbCrLf
Msg = Msg & "Copy your Manager"
MsgBox Msg, vbInformation, "Don't Forget"
End Sub

I want this message to pop up when the work book is opened.
right now it only works if I run the macro. thanks
 
F

FSt1

hi
you probably have the code in a standard module. if you want the msbbox to
pop up when the workbook is opened, put in the workbook open module. in the
project window(far left) double click thisworkbook then from the left combo
of the code window, select this workbook. the workbook_open() should default

Regards
FSt1
 
N

Norman Jones

Hi Marilyn,

Try posting the following code in the ThisWorkbook module:

'==========>>
Private Sub Workbook_Open()
Call Form23
End Sub
'<<==========


This is workbook event code and should
be pasted into the workbook's
ThisWorkbook module *not* a standard
module or a sheet module:

Right-click the Excel icon on the worksheet
(or the icon to the left of the File menu if
your workbook is maximised)
Select 'View Code' from the menu and paste
the code.
Alt-F11 to return to Excel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top