Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RTD methods in excel called before workbook_open event [email protected] Excel Programming 0 April 30th 08 03:44 PM
Workbook_Open event not called when workbook forced to re-open in read-only mode. Chrisso Excel Programming 2 May 15th 07 03:44 PM
workbook_open not being called when I open the excel file Hany Excel Programming 3 April 8th 06 01:34 PM
Run Workbook_Open only if called Jarek[_14_] Excel Programming 0 September 18th 04 10:05 AM
Run Workbook_Open only if called Jarek[_13_] Excel Programming 1 September 17th 04 03:10 PM


All times are GMT +1. The time now is 09:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"