Userforms and Macros

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

Guest

How do I get a message box to pop up when a file is opened?

Sub WorkBook_Activate()
MsgBox "Any physician reporting ...."
End Sub

This code gets message box to the worksheet only if I hit run from the VB
editor. I would like to warn the worksheet user as soon as they open the file.

Thanks,
Cinvic
 
You must place your code in ThisWorkbook's code, not in a Module

HTH
 

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