Workbook_Open not working
Hi
My user has Excel 2002 SP2 on his machine. I developed a spreadsheet on Excel 2002 SP3. On my machine it works fine irrespective of whether the Analysis Toolpak is selected or not. But when the user opens it on his machine the Workbook_Open event does not get fired. If Analysis toolpak is unselected the spreadsheet works fine. The Macro security is set to low. Any suggestions on how to get the event to work with the Analysis Toolpak selected. Thanks |
Dear Sheena:
First you need to check the obvious: is the Workbook_Open event really failing to start? I had a problem like yours with the RefEdit control; you cannot place a breakpoint in it because it will be ignored, yet the event will run correctly. The same applies with errors and the default error handler (On error goto 0). Try placing a msgbox "Test" on the very first line of your code for Workbook_Open event. If it works, then you will know that the problem is not in the event; it's in the default error handler. If you have a problem with the default error handler, one workaround to see if you have an error in your code (perhaps because the difference between the versions) is to use the On error goto err_handler option at the beginning of your code (after the Workbook_Open declaration), and adding err_handler: msgbox err.description to the bottom of your code. Hope that helps. G.Morales "Sheena N via OfficeKB.com" wrote: Hi My user has Excel 2002 SP2 on his machine. I developed a spreadsheet on Excel 2002 SP3. On my machine it works fine irrespective of whether the Analysis Toolpak is selected or not. But when the user opens it on his machine the Workbook_Open event does not get fired. If Analysis toolpak is unselected the spreadsheet works fine. The Macro security is set to low. Any suggestions on how to get the event to work with the Analysis Toolpak selected. Thanks |
Hi
Thanks for the quick reponse I removed all code from the Workbook_Open event and placed Msgbox "Test" there. If the Analysis Toolpak Add In is selected the Msgbox is not displayed. If the Add In is unselected the Msgbox is displayed. It looks like if the Addins is selected it does'nt even enter the Workbook_Open event. Thanks Sheena -- Message posted via http://www.officekb.com |
I've never seen excel behave this way. (I have the analysis toolpak enabled,
too.) If you move the code from the thisworkbook module and put it in a general module (and rename it to Auto_Open()), does that fire? === How does that person open the workbook? Is there any shortcut key envolved (either windows or an excel macro shortcut key???). If yes, remove the shift key from the shortcut. Holding the shift key down while opening a workbook will tell excel not to fire the open procedures. "Sheena N via OfficeKB.com" wrote: Hi Thanks for the quick reponse I removed all code from the Workbook_Open event and placed Msgbox "Test" there. If the Analysis Toolpak Add In is selected the Msgbox is not displayed. If the Add In is unselected the Msgbox is displayed. It looks like if the Addins is selected it does'nt even enter the Workbook_Open event. Thanks Sheena -- Message posted via http://www.officekb.com -- Dave Peterson |
Oh! I forgot about the SHIFT thing!
Good one, Dave "Dave Peterson" wrote: I've never seen excel behave this way. (I have the analysis toolpak enabled, too.) If you move the code from the thisworkbook module and put it in a general module (and rename it to Auto_Open()), does that fire? === How does that person open the workbook? Is there any shortcut key envolved (either windows or an excel macro shortcut key???). If yes, remove the shift key from the shortcut. Holding the shift key down while opening a workbook will tell excel not to fire the open procedures. "Sheena N via OfficeKB.com" wrote: Hi Thanks for the quick reponse I removed all code from the Workbook_Open event and placed Msgbox "Test" there. If the Analysis Toolpak Add In is selected the Msgbox is not displayed. If the Add In is unselected the Msgbox is displayed. It looks like if the Addins is selected it does'nt even enter the Workbook_Open event. Thanks Sheena -- Message posted via http://www.officekb.com -- Dave Peterson |
All times are GMT +1. The time now is 02:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com