Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a number of spreadsheets with code in the Workbook_Open sub. This
code is not being executed when the spreadsheets are opened. Even when I put a break point at the beginning of the code, the breakpoint is never triggered, which leads me to believe that the sub is never being called. The Workbook_Activate sub has the same problem. The spreadsheets were created with Excel 2000 and were modified and saved with Excel 2003. I did not have the problem prior to saving them with Excel 2003. If I create a new spreadsheet in Excel 2003 and copy the worksheets and VB code into the new spreadsheet, the Workbook_Open sub is called and the code is executed. However, all the formulas and pivot table references still point to the original spreadsheet, and it is way too much trouble to try to change all of these. Does anyone have any suggestions about how to fix the original spreadsheets to get around this problem? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 9 Sep, 13:16, dhputnam wrote:
I have a number of spreadsheets with code in the Workbook_Open sub. *This code is not being executed when the spreadsheets are opened. *Even when I put a break point at the beginning of the code, the breakpoint is never triggered, which leads me to believe that the sub is never being called. *The Workbook_Activate sub has the same problem. The spreadsheets were created with Excel 2000 and were modified and saved with Excel 2003. *I did not have the problem prior to saving them with Excel 2003. *If I create a new spreadsheet in Excel 2003 and copy the worksheets and VB code into the new spreadsheet, the Workbook_Open sub is called and the code is executed. *However, all the formulas and pivot table references still point to the original spreadsheet, and it is way too much trouble to try to change all of these. Does anyone have any suggestions about how to fix the original spreadsheets to get around this problem? Thanks. Have you tried the activate event? D. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There is no reason that event code that worked fine in Excel 2000 should not
run in 2003. I'd be happy to look at this problem workbook if you wanted to send it. Even a version with all the sheets cleared of entries to protect sensitive data, since the only thing that matters is the event code. and it is way too much trouble to try to change all of these. Well, it really shouldn't be if you don't have a huge number of linked workbooks. Use Edit, Links, point to each link, and use Change Source to change the link from the old workbook to the current one. -- Jim "dhputnam" wrote in message ... |I have a number of spreadsheets with code in the Workbook_Open sub. This | code is not being executed when the spreadsheets are opened. Even when I put | a break point at the beginning of the code, the breakpoint is never | triggered, which leads me to believe that the sub is never being called. The | Workbook_Activate sub has the same problem. | | The spreadsheets were created with Excel 2000 and were modified and saved | with Excel 2003. I did not have the problem prior to saving them with Excel | 2003. If I create a new spreadsheet in Excel 2003 and copy the worksheets | and VB code into the new spreadsheet, the Workbook_Open sub is called and the | code is executed. However, all the formulas and pivot table references still | point to the original spreadsheet, and it is way too much trouble to try to | change all of these. | | Does anyone have any suggestions about how to fix the original spreadsheets | to get around this problem? | | Thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Jim. I will send you a copy of the spreadsheet with some further
explanation. Don "Jim Rech" wrote: There is no reason that event code that worked fine in Excel 2000 should not run in 2003. I'd be happy to look at this problem workbook if you wanted to send it. Even a version with all the sheets cleared of entries to protect sensitive data, since the only thing that matters is the event code. and it is way too much trouble to try to change all of these. Well, it really shouldn't be if you don't have a huge number of linked workbooks. Use Edit, Links, point to each link, and use Change Source to change the link from the old workbook to the current one. -- Jim "dhputnam" wrote in message ... |I have a number of spreadsheets with code in the Workbook_Open sub. This | code is not being executed when the spreadsheets are opened. Even when I put | a break point at the beginning of the code, the breakpoint is never | triggered, which leads me to believe that the sub is never being called. The | Workbook_Activate sub has the same problem. | | The spreadsheets were created with Excel 2000 and were modified and saved | with Excel 2003. I did not have the problem prior to saving them with Excel | 2003. If I create a new spreadsheet in Excel 2003 and copy the worksheets | and VB code into the new spreadsheet, the Workbook_Open sub is called and the | code is executed. However, all the formulas and pivot table references still | point to the original spreadsheet, and it is way too much trouble to try to | change all of these. | | Does anyone have any suggestions about how to fix the original spreadsheets | to get around this problem? | | Thanks. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Duncan,
Thanks for the suggestion. I do know that the Workbook_Activate sub is not being called on the open, but I have not tried to trigger the activate event programmatically. I have a shortcut that calls the same macro that is called by the Workbook_Open sub, so I have a manual way to proceed, but the spreadsheet is supposed to automatically call the macro to refresh the data in the spreadsheet. Don "Duncan" wrote: On 9 Sep, 13:16, dhputnam wrote: I have a number of spreadsheets with code in the Workbook_Open sub. This code is not being executed when the spreadsheets are opened. Even when I put a break point at the beginning of the code, the breakpoint is never triggered, which leads me to believe that the sub is never being called. The Workbook_Activate sub has the same problem. The spreadsheets were created with Excel 2000 and were modified and saved with Excel 2003. I did not have the problem prior to saving them with Excel 2003. If I create a new spreadsheet in Excel 2003 and copy the worksheets and VB code into the new spreadsheet, the Workbook_Open sub is called and the code is executed. However, all the formulas and pivot table references still point to the original spreadsheet, and it is way too much trouble to try to change all of these. Does anyone have any suggestions about how to fix the original spreadsheets to get around this problem? Thanks. Have you tried the activate event? D. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Got your workbook, Don, and as I said in my email, the open code did run for
me. Life is strange, Excel stranger<g. -- Jim "dhputnam" wrote in message ... | Thanks, Jim. I will send you a copy of the spreadsheet with some further | explanation. | | Don | | "Jim Rech" wrote: | | There is no reason that event code that worked fine in Excel 2000 should not | run in 2003. I'd be happy to look at this problem workbook if you wanted to | send it. Even a version with all the sheets cleared of entries to protect | sensitive data, since the only thing that matters is the event code. | | and it is way too much trouble to try to change all of these. | | Well, it really shouldn't be if you don't have a huge number of linked | workbooks. Use Edit, Links, point to each link, and use Change Source to | change the link from the old workbook to the current one. | | -- | Jim | "dhputnam" wrote in message | ... | |I have a number of spreadsheets with code in the Workbook_Open sub. This | | code is not being executed when the spreadsheets are opened. Even when I | put | | a break point at the beginning of the code, the breakpoint is never | | triggered, which leads me to believe that the sub is never being called. | The | | Workbook_Activate sub has the same problem. | | | | The spreadsheets were created with Excel 2000 and were modified and saved | | with Excel 2003. I did not have the problem prior to saving them with | Excel | | 2003. If I create a new spreadsheet in Excel 2003 and copy the worksheets | | and VB code into the new spreadsheet, the Workbook_Open sub is called and | the | | code is executed. However, all the formulas and pivot table references | still | | point to the original spreadsheet, and it is way too much trouble to try | to | | change all of these. | | | | Does anyone have any suggestions about how to fix the original | spreadsheets | | to get around this problem? | | | | Thanks. | | |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your help. It turned out that having the Analysis Toolpack and
the Analysis Toolpack - VBA add-ins installed was causing the Workbook_Open not to be called. I manually uninstalled these add-ins and modified the spreadsheet to programmatically install them on the open and uninstall them on the close. "Jim Rech" wrote: Got your workbook, Don, and as I said in my email, the open code did run for me. Life is strange, Excel stranger<g. -- Jim "dhputnam" wrote in message ... | Thanks, Jim. I will send you a copy of the spreadsheet with some further | explanation. | | Don | | "Jim Rech" wrote: | | There is no reason that event code that worked fine in Excel 2000 should not | run in 2003. I'd be happy to look at this problem workbook if you wanted to | send it. Even a version with all the sheets cleared of entries to protect | sensitive data, since the only thing that matters is the event code. | | and it is way too much trouble to try to change all of these. | | Well, it really shouldn't be if you don't have a huge number of linked | workbooks. Use Edit, Links, point to each link, and use Change Source to | change the link from the old workbook to the current one. | | -- | Jim | "dhputnam" wrote in message | ... | |I have a number of spreadsheets with code in the Workbook_Open sub. This | | code is not being executed when the spreadsheets are opened. Even when I | put | | a break point at the beginning of the code, the breakpoint is never | | triggered, which leads me to believe that the sub is never being called. | The | | Workbook_Activate sub has the same problem. | | | | The spreadsheets were created with Excel 2000 and were modified and saved | | with Excel 2003. I did not have the problem prior to saving them with | Excel | | 2003. If I create a new spreadsheet in Excel 2003 and copy the worksheets | | and VB code into the new spreadsheet, the Workbook_Open sub is called and | the | | code is executed. However, all the formulas and pivot table references | still | | point to the original spreadsheet, and it is way too much trouble to try | to | | change all of these. | | | | Does anyone have any suggestions about how to fix the original | spreadsheets | | to get around this problem? | | | | Thanks. | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_Open Sub not called when spreadsheet is opened | Excel Programming | |||
RTD methods in excel called before workbook_open event | 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 |