Thread: Macro On Open
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] adambush4242@hotmail.com is offline
external usenet poster
 
Posts: 168
Default Macro On Open

Thanks a lot Paul worked perfectly!

"PCLIVE" wrote:

All+F11 to enter VB editor. Double-click ThisWorkbook.

Paste the following:

Private Sub Workbook_Open()
<Your Code Here
End Sub


I believe the code will run once the password is entered.
Regards,
Paul
"
m wrote in message
...
What code do I need to run a macro when a file is opened? The sub name is
PNL. Also, this file is password protected. Will that affect anything?

Thanks

Adam Bush