Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Disable a Macro

I have a macro that runs automatically every time certain cells are changed
I also have an "update" macro which I run manually.
Is there code I can put into the "update" macro that disables the automatic
macro, allowing the "update" routine to run unimpeded, then insert another
line of code to re-enable the automatic macro?

Dave.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Disable a Macro


application.EnableEvents = false

then at the end of your code:
application.EnableEvents = true

You might also need to use
application.calculation = xlmanual

followed by (at the end of the code)
application.calculation = xlautomatic



On Thu, 15 Dec 2005 23:32:22 -0000, Dave wrote:

I have a macro that runs automatically every time certain cells are
changed
I also have an "update" macro which I run manually.
Is there code I can put into the "update" macro that disables the
automatic
macro, allowing the "update" routine to run unimpeded, then insert
another
line of code to re-enable the automatic macro?

Dave.



------------------
Darren
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Disable a Macro

Thanks Darren - Worked a treat. I was searching the HELP for "disable"
Dave.


"Darren Hill" wrote in message
news:op.s1umxakped89cl@omega...

application.EnableEvents = false

then at the end of your code:
application.EnableEvents = true

You might also need to use
application.calculation = xlmanual

followed by (at the end of the code)
application.calculation = xlautomatic



On Thu, 15 Dec 2005 23:32:22 -0000, Dave wrote:

I have a macro that runs automatically every time certain cells are
changed
I also have an "update" macro which I run manually.
Is there code I can put into the "update" macro that disables the
automatic
macro, allowing the "update" routine to run unimpeded, then insert
another
line of code to re-enable the automatic macro?

Dave.



------------------
Darren



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Disable a Macro

Glad top help.

Darren

On Fri, 16 Dec 2005 01:04:47 -0000, Dave wrote:

Thanks Darren - Worked a treat. I was searching the HELP for "disable"
Dave.


"Darren Hill" wrote in message
news:op.s1umxakped89cl@omega...

application.EnableEvents = false

then at the end of your code:
application.EnableEvents = true

You might also need to use
application.calculation = xlmanual

followed by (at the end of the code)
application.calculation = xlautomatic



On Thu, 15 Dec 2005 23:32:22 -0000, Dave
wrote:

I have a macro that runs automatically every time certain cells are
changed
I also have an "update" macro which I run manually.
Is there code I can put into the "update" macro that disables the
automatic
macro, allowing the "update" routine to run unimpeded, then insert
another
line of code to re-enable the automatic macro?

Dave.



------------------
Darren






--
------------------
Darren
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
Disable running of SelectionChange macro when in another macro? Tonso Excel Discussion (Misc queries) 6 March 21st 10 06:50 PM
Disable Esc-key - macro yshridhar Excel Discussion (Misc queries) 4 February 9th 08 04:19 AM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
Disable the Macro Pop up Sunil Excel Programming 2 September 11th 04 01:32 PM
Disable Macro at open by an external macro Ricardo[_2_] Excel Programming 0 November 10th 03 07:50 PM


All times are GMT +1. The time now is 11:45 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"