![]() |
temporarily disabling subroutines
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 |
temporarily disabling subroutines
Application.EnableEvents=False
'do your stuff Application.EnableEvents=True Tim "NDBC" wrote in message ... 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 |
All times are GMT +1. The time now is 01:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com