View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael[_4_] Michael[_4_] is offline
external usenet poster
 
Posts: 27
Default Dissable Workbook_Open Event in certian cases

I have a MS Access routine that opens a whole bunch of Excel models
and sucks data out into a data base. Problem is since I set it up some
of the excel files now have a Workbook_Open event that gets triggered
when Access Opens the workbooks. The event asks for some user input
which I want to avoid when opened by Access.

Is there a way for Excel to tell that it is being opend by VBA in
Access as opposed to the user opening the file?

This is how I am opening the workbooks from Excel
Set xlsApp = CreateObject("Excel.application")
Set wb = xlsApp.Workbooks.Open(Path & Filename, , True)

Any ideas would be appreciated.

Thanks.