Application.EnableEvents = true/false
allows you to turn on/off ALL events, not just sheet change events,
but also BeforeSave, close, activate/deactivate, etc...

If you only want to turn on/off a specific event handler,
you can declare a Public variable like;

Public ChangeFlag

Set it to true/false
then, within your event, check this status before running.
If (not ChangeFlag) Then Exit Sub

hope this helps,

Paul

----- Original Message ----
> From: Ted <suicid...@gmail.com>
> To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com>
> Sent: Mon, November 1, 2010 8:20:52 AM
> Subject: $$Excel-Macros$$ $$Excel Macros$$ Worksheet_Change from Module
> 
> I use one book for portability of macros and I'd like to be able to
> turn on and off a worksheet_change macro from the book, not by adding
> the script to each individual worksheet.  I can't find any information
> on this anywhere, so I thought this would be a good place to ask.  All
> I can think of is worksheets.change = blah but I haven't found any
> properties like that.
> 
> -- 
>----------------------------------------------------------------------------------
>-
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links : 
>http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> 
> To post to this group, send email to excel-macros@googlegroups.com
> 
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts
> 

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to