Is there a way to turn events on or off?

A

Angus Comber

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
[email protected]
 
C

Chip Pearson

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 [email protected]
 
Top