View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default How to determine if an excel Excel was open by code (automation) or manually, by a human user

In the code that will open the file (by automation) bracket the file open
command with:
Application.EnableEvents=False
'your file open command goes here
Application.EnableEvents=True
HTH Otto
"Radu" wrote in message
...
Hi. An excel file is opened by people, but also by code from a VB
application.

I would like the code in Workbook_Open to run whenever the file is
opened by a human, but not to run when the file is opened by
automation.

Any ideas ?

Thank you very much
Alex.