Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default preventing code from running

hi all
I'm sure this is easy, but I'm a bit stuck.

I have a sub that is executed when the Worksheet_Change event fires. There
is also a macro that I run (mod_Evaluate) while working on that sheet. Both
sets of code work fine, but...

I want Worksheet_Change code to be in effect at all times EXCEPT when I run
mod_Evaluate. What code can I add to mod_Evaluate to temporarily stop the
Worksheet_Change code?

Thank you
anny









  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default preventing code from running

Application.EnableEvents = False
'Your macro code
Application.EnableEvents = True
HTH Otto
"anny" wrote in message
...
hi all
I'm sure this is easy, but I'm a bit stuck.

I have a sub that is executed when the Worksheet_Change event fires.
There is also a macro that I run (mod_Evaluate) while working on that
sheet. Both sets of code work fine, but...

I want Worksheet_Change code to be in effect at all times EXCEPT when I
run mod_Evaluate. What code can I add to mod_Evaluate to temporarily stop
the Worksheet_Change code?

Thank you
anny











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
Preventing code continuing running Bill Excel Programming 3 March 3rd 06 03:48 AM
Running Code from Add-Ins DeanO Excel Programming 1 October 27th 05 05:20 PM
Preventing User Access to VB code halem2[_13_] Excel Programming 2 August 23rd 04 10:57 PM
running VB code Cath[_3_] Excel Programming 1 November 21st 03 05:09 PM
Preventing Duplicates using VBA (code) Jerry McCutchen Excel Programming 1 July 11th 03 04:51 PM


All times are GMT +1. The time now is 09:39 AM.

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"