PC Review


Reply
Thread Tools Rate Thread

What can inhibit an event handler?

 
 
Al
Guest
Posts: n/a
 
      25th Mar 2008
XL2003 on XP
In one instance of Excel, I had two files open and then opened a third file
that has a macro that should fire on workbook_open. For some reason, this
macro did not run. I closed the third file and tried this twice more with no
success. In a second instance of Excel I opened this file and the macro
fired.

I know that if I had a macro running (or stopped for some reason) and I
opened the third file, I would not expect its workbook_open event handler to
run. I know that wasn’t the case here. Does anyone know of anything else
that could cause this to happen? It’s not a show stopper, but it certainly
has me puzzled.

--
Al C
 
Reply With Quote
 
 
 
 
OssieMac
Guest
Posts: n/a
 
      26th Mar 2008
Just a thought. You haven't run a macro with Application.Enable.Events =
false and then not turned the events back on again with
Application.Enable.Events = true?

--
Regards,

OssieMac


"Al" wrote:

> XL2003 on XP
> In one instance of Excel, I had two files open and then opened a third file
> that has a macro that should fire on workbook_open. For some reason, this
> macro did not run. I closed the third file and tried this twice more with no
> success. In a second instance of Excel I opened this file and the macro
> fired.
>
> I know that if I had a macro running (or stopped for some reason) and I
> opened the third file, I would not expect its workbook_open event handler to
> run. I know that wasn’t the case here. Does anyone know of anything else
> that could cause this to happen? It’s not a show stopper, but it certainly
> has me puzzled.
>
> --
> Al C

 
Reply With Quote
 
Al
Guest
Posts: n/a
 
      27th Mar 2008
That's it! I had interrupted an original macro to do some debugging and
forgot that it never ran all the way to reset the switch.

Thanks, OssieMac.
--
Al C


"OssieMac" wrote:

> Just a thought. You haven't run a macro with Application.Enable.Events =
> false and then not turned the events back on again with
> Application.Enable.Events = true?
>
> --
> Regards,
>
> OssieMac
>
>
> "Al" wrote:
>
> > XL2003 on XP
> > In one instance of Excel, I had two files open and then opened a third file
> > that has a macro that should fire on workbook_open. For some reason, this
> > macro did not run. I closed the third file and tried this twice more with no
> > success. In a second instance of Excel I opened this file and the macro
> > fired.
> >
> > I know that if I had a macro running (or stopped for some reason) and I
> > opened the third file, I would not expect its workbook_open event handler to
> > run. I know that wasn’t the case here. Does anyone know of anything else
> > that could cause this to happen? It’s not a show stopper, but it certainly
> > has me puzzled.
> >
> > --
> > Al C

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      30th Mar 2008
I have a small sub called Oops() that resets these things.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Al" <(E-Mail Removed)> wrote in message
news:B88E584A-5A95-43C3-B51D-(E-Mail Removed)...
> That's it! I had interrupted an original macro to do some debugging and
> forgot that it never ran all the way to reset the switch.
>
> Thanks, OssieMac.
> --
> Al C
>
>
> "OssieMac" wrote:
>
>> Just a thought. You haven't run a macro with Application.Enable.Events =
>> false and then not turned the events back on again with
>> Application.Enable.Events = true?
>>
>> --
>> Regards,
>>
>> OssieMac
>>
>>
>> "Al" wrote:
>>
>> > XL2003 on XP
>> > In one instance of Excel, I had two files open and then opened a third
>> > file
>> > that has a macro that should fire on workbook_open. For some reason,
>> > this
>> > macro did not run. I closed the third file and tried this twice more
>> > with no
>> > success. In a second instance of Excel I opened this file and the
>> > macro
>> > fired.
>> >
>> > I know that if I had a macro running (or stopped for some reason) and I
>> > opened the third file, I would not expect its workbook_open event
>> > handler to
>> > run. I know that wasn't the case here. Does anyone know of anything
>> > else
>> > that could cause this to happen? It's not a show stopper, but it
>> > certainly
>> > has me puzzled.
>> >
>> > --
>> > Al C



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Handler that creates adds another event handler kaczmar2@gmail.com Microsoft ASP .NET 1 22nd Feb 2007 07:37 AM
Check if object handles/is hooked up to a certain type of event/event handler nford@vizual.co.uk Microsoft VB .NET 2 14th Jun 2005 11:58 AM
setting a breakpoint in a WinForms event handler... and then getting caught in the event loop. Hazz Microsoft C# .NET 8 14th Feb 2005 08:25 PM
How to Remove an Event Handler without knowing the name of the handler Charles Law Microsoft VB .NET 4 10th Jun 2004 03:48 PM
Create new event handler or override existing handler? =?Utf-8?B?V29vbiBLaWF0?= Microsoft Dot NET Framework Forms 1 5th Jan 2004 08:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:44 PM.