View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 172
Default error in code when placed in workbook_open

Sorry i made a mistake.
Macro1 is in the code for Sheet2.

AHHH

Thanks for the pointer.
I moved it to a Module and it now is fine.

Thanks
Corey....



....
"NickHK" wrote in message
...
Corey,
Where is "macro1" ? Public in a normal module ?

NickHK


"Corey" wrote in message
...
Sub Workbook_Open()
Worksheets("Sheet2").Select
Call Macro1
End Sub

I am getting an error of:

'Compile error:

Sub or Function not defined'




Yet if i manually run the macro it works fine??


Corey....