View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] sujatha_krao@hotmail.com is offline
external usenet poster
 
Posts: 4
Default WorkBook Activate event not working

Hello,

I have an excel addin (.xla) file under excel startup folder (ie,
\office11\startup), where I have defined App_WorkbookActivate event.
This macro executes fine when I open the excel file from explorer. But
when I open the file from automation, it does not execute.
The code is as follows,

Application.EnableEvent(True)
ActiveWorkbook = AllWorkbooks.Open("filename")
ActiveWorkbook.RunAutoMacros(3)

Any suggestions would help!

Thankyou.