message box when file is opened

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello I have been serching around in this forum and dont really understand
how to do this. I want a pop up message to open when an .xls file is opened.
I did find someone wrote this. But I dont know how to do this I never messed
with macro ect. Can someone explaing in depthe how this is done? Thanks!!!!!

putn the following code in yopur workbook module ('ThisWorkbook'):
sub workbook_open()
msgbox "Now opening..."
end sub
 
Hi oxicottin

Alt F11 to open the editor
To be sure you see all windows press one time Ctrl-R and F7

Double click on the ThisWorkbook module on the left in the project window
If you not see it click on the + before the project/file name

Then paste this in the code window

Private Sub Workbook_Open()
MsgBox "Hi"
End Sub

Then use Alt q to close the editor
Save/close and reopen the file now
 

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

Back
Top