Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet change event error events disabled
Hi there
I noticed that occurring errors disable the triggering of eventprocedures. I thought I'd deal with this by adding an error handler to the code in this mannor: sub test() Application.EnableEvents = False On error goto Errorhandler ..... Application.EnableEvents = True Exit Sub Errorhandler: Application.EnableEvents = True End sub Deleting an entire row forinstance would cause an error, but adding this errorhandling code causes excel not to inform me about the error, which is logical. However, the events are not re-enabled. Does anyone have expirience with this ? Greetings, Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet change event error events disabled
Peter,
Mine is similar, just a little different sub test() Application.EnableEvents = False On error goto Errorhandler ..... Errorhandler: Application.EnableEvents = True End sub and I don't get your problem. Why does deleting a row generate an error? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Peter" wrote in message ... Hi there I noticed that occurring errors disable the triggering of eventprocedures. I thought I'd deal with this by adding an error handler to the code in this mannor: sub test() Application.EnableEvents = False On error goto Errorhandler .... Application.EnableEvents = True Exit Sub Errorhandler: Application.EnableEvents = True End sub Deleting an entire row forinstance would cause an error, but adding this errorhandling code causes excel not to inform me about the error, which is logical. However, the events are not re-enabled. Does anyone have expirience with this ? Greetings, Peter |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet change event error events disabled
Thanks for your help, Bob.
A good nights rest, however, helped me solve my problem even before I checked for any replies. Peter "Bob Phillips" schreef in bericht ... Peter, Mine is similar, just a little different sub test() Application.EnableEvents = False On error goto Errorhandler .... Errorhandler: Application.EnableEvents = True End sub and I don't get your problem. Why does deleting a row generate an error? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Peter" wrote in message ... Hi there I noticed that occurring errors disable the triggering of eventprocedures. I thought I'd deal with this by adding an error handler to the code in this mannor: sub test() Application.EnableEvents = False On error goto Errorhandler .... Application.EnableEvents = True Exit Sub Errorhandler: Application.EnableEvents = True End sub Deleting an entire row forinstance would cause an error, but adding this errorhandling code causes excel not to inform me about the error, which is logical. However, the events are not re-enabled. Does anyone have expirience with this ? Greetings, Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combine 2 worksheet change events | Excel Discussion (Misc queries) | |||
Worksheet Change Event | Excel Discussion (Misc queries) | |||
Worksheet change Event | Excel Worksheet Functions | |||
Worksheet Change event | Excel Discussion (Misc queries) | |||
Delete creates error during Change event | Excel Programming |