temporarily disabling subroutines

N

NDBC

I have some subroutines with the following heading in several worksheets

Private Sub Worksheet_Change(ByVal Target As Range)

They are set up to automatically set values when data is being entered and
are working fine.

The problem occurs when I have finished and I run another subroutine to
clear all the data in the worksheets. It seems to take a long time now and i
think it is because of the subroutines that are triggered when a change
occurs. Can I put in my deleting subroutine code that temporarily disables
the private subs and then enables them when finished.

Thanks
 
T

Tim Williams

Application.EnableEvents=False
'do your stuff
Application.EnableEvents=True

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top