Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook_Open Sub not called when spreadsheet is opened
I have a number of spreadsheets that have code in the Workbook_Open Sub, but
the code never gets executed when the spreadsheet is opened. Even if I set a breakpoint in this code, it never hits the breakpoint, which leads me to believe that the Workbook_Open Sub is not being invoked when the spreadsheet is opened. I have the same problem with the Workbook_Activate. The code in the Workbook_Open calls a macro. I can invoke the macro with the shortcut key (Ctrl+Shift+Q), and it works fine. Because of another problem I had using shortcut keys, I removed the shortcut from the macro, but the Workbook_Open still did not get called. The spreadsheets were created in Excel 2000 and then were modified and saved in Excel 2003. I never had the problem with Excel 2000. I have tried copying all of the worksheets from one of my spreadsheets into a new Excel 2003 spreadsheet, and the problem does not occur, but all of the formulas, pivot tables, etc. point to the original file, so it is more trouble than it is worth to try to fix all of these references. Does anyone have any suggestions about how to fix my original spreadsheets? Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook_Open Sub not called when spreadsheet is opened
Maybe your events have been disabled somehow.
Type this in the Immediate Window. Hit Ctrl + G to activate window. Application.EnableEvents = True This will ensure that all events in the application are enabled, thus should run your Workbook_Open Event. Hope this helps! If so, let me know and please click "YES" below. -- Cheers, Ryan "dhputnam" wrote: I have a number of spreadsheets that have code in the Workbook_Open Sub, but the code never gets executed when the spreadsheet is opened. Even if I set a breakpoint in this code, it never hits the breakpoint, which leads me to believe that the Workbook_Open Sub is not being invoked when the spreadsheet is opened. I have the same problem with the Workbook_Activate. The code in the Workbook_Open calls a macro. I can invoke the macro with the shortcut key (Ctrl+Shift+Q), and it works fine. Because of another problem I had using shortcut keys, I removed the shortcut from the macro, but the Workbook_Open still did not get called. The spreadsheets were created in Excel 2000 and then were modified and saved in Excel 2003. I never had the problem with Excel 2000. I have tried copying all of the worksheets from one of my spreadsheets into a new Excel 2003 spreadsheet, and the problem does not occur, but all of the formulas, pivot tables, etc. point to the original file, so it is more trouble than it is worth to try to fix all of these references. Does anyone have any suggestions about how to fix my original spreadsheets? Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
RTD methods in excel called before workbook_open event | Excel Programming | |||
Workbook_Open event not called when workbook forced to re-open in read-only mode. | Excel Programming | |||
workbook_open not being called when I open the excel file | Excel Programming | |||
Run Workbook_Open only if called | Excel Programming | |||
Run Workbook_Open only if called | Excel Programming |