ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What can inhibit an event handler? (https://www.excelbanter.com/excel-programming/408306-what-can-inhibit-event-handler.html)

al

What can inhibit an event handler?
 
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 wasnt the case here. Does anyone know of anything else
that could cause this to happen? Its not a show stopper, but it certainly
has me puzzled.

--
Al C

OssieMac

What can inhibit an event handler?
 
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 wasnt the case here. Does anyone know of anything else
that could cause this to happen? Its not a show stopper, but it certainly
has me puzzled.

--
Al C


al

What can inhibit an event handler?
 
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 wasnt the case here. Does anyone know of anything else
that could cause this to happen? Its not a show stopper, but it certainly
has me puzzled.

--
Al C


Jon Peltier

What can inhibit an event handler?
 
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" wrote in message
...
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





All times are GMT +1. The time now is 07:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com