Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 204
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default 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



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
Disabling SAVE AS Temporarily monir Excel Programming 3 January 8th 08 08:03 PM
Disabling effects of cells (temporarily) booner Excel Programming 1 November 11th 05 01:35 PM
Subroutines vs. modules BrianG[_4_] Excel Programming 0 September 7th 04 10:21 PM
common subroutines - add-in Tom Ogilvy Excel Programming 2 August 25th 04 12:51 AM
Temporarily Disabling an Event Macro stratuser Excel Programming 2 December 2nd 03 08:07 PM


All times are GMT +1. The time now is 08:14 PM.

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"