ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is there a way to turn events on or off? (https://www.excelbanter.com/excel-programming/281681-there-way-turn-events-off.html)

Angus Comber[_2_]

Is there a way to turn events on or off?
 
Hello

I am using a Worksheet_SelectionChange event which is very useful. however,
it is a bit of a pain if it fires off right at the start of my code. So is
there any way to disable event handling and then when say a process is
finished turn it on again?

Angus Comber






Chip Pearson

Is there a way to turn events on or off?
 
Angus,

You can disable events with code like

Application.EnableEvents = False
' your code here
Application.EnableEvents = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Angus Comber" wrote in message
...
Hello

I am using a Worksheet_SelectionChange event which is very useful.

however,
it is a bit of a pain if it fires off right at the start of my code. So

is
there any way to disable event handling and then when say a process is
finished turn it on again?

Angus Comber









All times are GMT +1. The time now is 10:42 PM.

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