ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shift key doesn't stop Auto_Open() from firing (https://www.excelbanter.com/excel-programming/439222-shift-key-doesnt-stop-auto_open-firing.html)

Jeff Hunt

Shift key doesn't stop Auto_Open() from firing
 
I have an Excel workbook that is opened from another program. The workbook
has an Auto_Open macro to perform several tasks each time it is opened. When
I am trying to work on the code, it seems that holding down the Shift key
when I open the workbook does not prevent the macro from executing
automatically. I thought that in the past holding Shift had always prevented
the code from running. Has anyone else run into this or know how to get it
working again?
--
....jeff...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Bernie Deitrick

Shift key doesn't stop Auto_Open() from firing
 
Jeff,

Posting your code would help, but try setting the Excel Object's
EnableEvents property to false prior to opening the file, and set it back to
true after...

HTH,
Bernie
MS Excel MVP


"Jeff Hunt" wrote in message
...
I have an Excel workbook that is opened from another program. The workbook
has an Auto_Open macro to perform several tasks each time it is opened.
When
I am trying to work on the code, it seems that holding down the Shift key
when I open the workbook does not prevent the macro from executing
automatically. I thought that in the past holding Shift had always
prevented
the code from running. Has anyone else run into this or know how to get
it
working again?
--
...jeff...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com