+ Reply to Thread
Results 1 to 4 of 4

Disable a Macro

  1. #1
    Dave
    Guest

    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. #2
    Darren Hill
    Guest

    Re: 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 <[email protected]> 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. #3
    Dave
    Guest

    Re: Disable a Macro

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


    "Darren Hill" <[email protected]> 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 <[email protected]> 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. #4
    Darren Hill
    Guest

    Re: Disable a Macro

    Glad top help.

    Darren

    On Fri, 16 Dec 2005 01:04:47 -0000, Dave <[email protected]> wrote:

    > Thanks Darren - Worked a treat. I was searching the HELP for "disable"
    > Dave.
    >
    >
    > "Darren Hill" <[email protected]> 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 <[email protected]>
    >> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1