Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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
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
Combine 2 worksheet change events nobbyknownowt Excel Discussion (Misc queries) 0 May 28th 10 10:49 AM
Worksheet Change Event Tony S.[_2_] Excel Discussion (Misc queries) 11 February 18th 09 01:04 AM
Worksheet change Event ranswert Excel Worksheet Functions 1 January 17th 08 11:17 PM
Worksheet Change event LAF Excel Discussion (Misc queries) 3 January 4th 06 02:08 AM
Delete creates error during Change event Random Excel Programming 4 August 28th 03 08:37 AM


All times are GMT +1. The time now is 02:36 AM.

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"