Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook_Open does not run for Addin
I have an addin which handles events for certain workbooks. It makes
itself available through a menu bar. During the process of opening a new workbook, it is supposed to catch the Workbook_open event and check if the workbook being opened is something it should handle, if it is, the menu is shown, if not, it does nothing. The addin also handles other events such as double clicking on cells . After some period of using the workbook with the addin enabled, it seems to just stop handling events. I am checking that Application.EnableEvents is still true and it is. But all events are unhandled, including(it seems) workbook_open. Now, the workbook_open event that is defined is in the addin's workbook... but it seems to handle everything most of the time. If anyone can give me a hint at what to look for I would appreciate it. Sorry, I can't really post the code due to length and corporate restriction. I'm just trying to figure out if there's a VBA guru out there that has seen this sort of behavior before. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook_Open does not run for Addin
The workbook open event in an addin catches when the addin is opened, not
when other files are opened. That is similar to the workbook open event in a regular workbook. You need to catch applicition level events. Check out this link. http://www.cpearson.com/excel/AppEvent.aspx -- HTH... Jim Thomlinson " wrote: I have an addin which handles events for certain workbooks. It makes itself available through a menu bar. During the process of opening a new workbook, it is supposed to catch the Workbook_open event and check if the workbook being opened is something it should handle, if it is, the menu is shown, if not, it does nothing. The addin also handles other events such as double clicking on cells . After some period of using the workbook with the addin enabled, it seems to just stop handling events. I am checking that Application.EnableEvents is still true and it is. But all events are unhandled, including(it seems) workbook_open. Now, the workbook_open event that is defined is in the addin's workbook... but it seems to handle everything most of the time. If anyone can give me a hint at what to look for I would appreciate it. Sorry, I can't really post the code due to length and corporate restriction. I'm just trying to figure out if there's a VBA guru out there that has seen this sort of behavior before. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook_Open does not run for Addin
On Jul 8, 4:19*pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote: The workbook open event in an addin catches when the addin is opened, not when other files are opened. That is similar to the workbook open event in a regular workbook. You need to catch applicition level events. Check out this link. http://www.cpearson.com/excel/AppEvent.aspx -- HTH... Jim Thomlinson " wrote: I have an addin which handles events for certain workbooks. *It makes itself available through a menu bar. *During the process of opening a new workbook, it is supposed to catch the Workbook_open event and check if the workbook being opened is something it should handle, if it is, the menu is shown, if not, it does nothing. *The addin also handles other events such as double clicking on cells . After some period of using the workbook with the addin enabled, it seems to just stop handling events. *I am checking that Application.EnableEvents is still true and it is. *But all events are unhandled, including(it seems) workbook_open. *Now, the workbook_open event that is defined is in the addin's workbook... but it seems to handle everything most of the time. * If anyone can give me a hint at what to look for I would appreciate it. *Sorry, I can't really post the code due to length and corporate restriction. *I'm just trying to figure out if there's a VBA guru out there that has seen this sort of behavior before. Thanks Thanks for that info. This workbook_open event *does* work most of the time as it is. According to your post, it shouldn't work at all. Any idea why it does? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook_Open does not run for Addin
I have not seen what you are describing. A workbook can catch it's own events
but not events in other workbooks from my experience. That is true regardless whether it is a regular workbook or an addin. When you instantiate a new Excel object as described in the link I posted, it is at the application level and not the workbook level, so it can listen for events in any workbook. -- HTH... Jim Thomlinson " wrote: On Jul 8, 4:19 pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move- This-.com wrote: The workbook open event in an addin catches when the addin is opened, not when other files are opened. That is similar to the workbook open event in a regular workbook. You need to catch applicition level events. Check out this link. http://www.cpearson.com/excel/AppEvent.aspx -- HTH... Jim Thomlinson " wrote: I have an addin which handles events for certain workbooks. It makes itself available through a menu bar. During the process of opening a new workbook, it is supposed to catch the Workbook_open event and check if the workbook being opened is something it should handle, if it is, the menu is shown, if not, it does nothing. The addin also handles other events such as double clicking on cells . After some period of using the workbook with the addin enabled, it seems to just stop handling events. I am checking that Application.EnableEvents is still true and it is. But all events are unhandled, including(it seems) workbook_open. Now, the workbook_open event that is defined is in the addin's workbook... but it seems to handle everything most of the time. If anyone can give me a hint at what to look for I would appreciate it. Sorry, I can't really post the code due to length and corporate restriction. I'm just trying to figure out if there's a VBA guru out there that has seen this sort of behavior before. Thanks Thanks for that info. This workbook_open event *does* work most of the time as it is. According to your post, it shouldn't work at all. Any idea why it does? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
setup project for Excel addin, won't register addin | Excel Programming | |||
Call an addin Macro from Workbook_Open event | Excel Programming | |||
Removing an Addin from the Tools Addin list. | Excel Programming | |||
Unshimmed Automation Addin and Shimmed COM Addin in same App Domai | Excel Programming | |||
Remove Excel AddIn from AddIn List !! Help | Excel Programming |