Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Monitoring application-level event problem

I am working on a project, and for inspiration I am using Walkenbach's
utility (from Excel 2002 power programming with VBA)... I have dumped all of
the code to a .XLA, which i load. It works perfectly, except when I run
other macros (e.g., from my Personal.xls) and use CTRL-Break to stop the
macro. After that point, even though the XL object still exists, and it
works normally (tested using the immediate window), no application-level
events work.

This occurs even if I set XL = nothing and then set it back to the
excel.application or thisworkbook.parent.

Does interrupting a macro (and then ending it) do something to the current
Excel instance which prevents all future events from firing?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Monitoring application-level event problem

You could have been in the middle of code that had set application.enableevents
= false. So excel won't be monitoring any events.

But my real guess is that by clicking on the End statement, you've reset all the
variables in that workbook. Including your class module's. Try running your
workbook_open (?) event to see if that helps.

If it does, you'll either have to add more error checking to stop the blowing up
of your code or some kind of error handler.



R Avery wrote:

I am working on a project, and for inspiration I am using Walkenbach's
utility (from Excel 2002 power programming with VBA)... I have dumped all of
the code to a .XLA, which i load. It works perfectly, except when I run
other macros (e.g., from my Personal.xls) and use CTRL-Break to stop the
macro. After that point, even though the XL object still exists, and it
works normally (tested using the immediate window), no application-level
events work.

This occurs even if I set XL = nothing and then set it back to the
excel.application or thisworkbook.parent.

Does interrupting a macro (and then ending it) do something to the current
Excel instance which prevents all future events from firing?


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Monitoring application-level event problem

I'll try. Thanks.



"Dave Peterson" wrote in message
...
You could have been in the middle of code that had set

application.enableevents
= false. So excel won't be monitoring any events.

But my real guess is that by clicking on the End statement, you've reset

all the
variables in that workbook. Including your class module's. Try running

your
workbook_open (?) event to see if that helps.

If it does, you'll either have to add more error checking to stop the

blowing up
of your code or some kind of error handler.



R Avery wrote:

I am working on a project, and for inspiration I am using Walkenbach's
utility (from Excel 2002 power programming with VBA)... I have dumped

all of
the code to a .XLA, which i load. It works perfectly, except when I run
other macros (e.g., from my Personal.xls) and use CTRL-Break to stop the
macro. After that point, even though the XL object still exists, and it
works normally (tested using the immediate window), no application-level
events work.

This occurs even if I set XL = nothing and then set it back to the
excel.application or thisworkbook.parent.

Does interrupting a macro (and then ending it) do something to the

current
Excel instance which prevents all future events from firing?


--

Dave Peterson



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
Launch Click Event Using Application.Run cellist Excel Discussion (Misc queries) 4 November 5th 09 12:46 AM
captcure close application event suru Excel Worksheet Functions 2 June 17th 09 07:10 AM
Application level event help John Bundy Excel Discussion (Misc queries) 2 January 15th 08 10:30 PM
Turn off Reviewing options at the application level Tracey Excel Discussion (Misc queries) 1 August 6th 05 12:43 AM
Why, when I create workbook-level name does it jump it to Sheet-level ? Charles Jordan Excel Programming 1 November 5th 03 08:43 PM


All times are GMT +1. The time now is 08:30 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"