Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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
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
setup project for Excel addin, won't register addin Gerry Excel Programming 0 October 31st 07 12:01 AM
Call an addin Macro from Workbook_Open event [email protected] Excel Programming 2 August 29th 07 07:19 PM
Removing an Addin from the Tools Addin list. Trefor Excel Programming 2 August 25th 06 04:45 PM
Unshimmed Automation Addin and Shimmed COM Addin in same App Domai Brandon Excel Programming 0 June 27th 06 11:18 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM


All times are GMT +1. The time now is 04:08 PM.

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"