Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Launch Click Event Using Application.Run | Excel Discussion (Misc queries) | |||
captcure close application event | Excel Worksheet Functions | |||
Application level event help | Excel Discussion (Misc queries) | |||
Turn off Reviewing options at the application level | Excel Discussion (Misc queries) | |||
Why, when I create workbook-level name does it jump it to Sheet-level ? | Excel Programming |