+ Reply to Thread
Results 1 to 3 of 3

When will macro in module run when Application.EnableEvents is set to False?

  1. #1
    Registered User
    Join Date
    04-18-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    40

    When will macro in module run when Application.EnableEvents is set to False?

    Hi,

    I have a worksheet with a number of macros in it that run when a value in the worksheet changes. For each of these macros, I have set

    Please Login or Register  to view this content.
    and the last line of the macro is

    Please Login or Register  to view this content.
    My questions is if another macro within a module is called while the worksheet change macro is running, will it immediately run after the worksheet change macro or will it be completely ignored and will have to be called again at such time when on of the worksheet change macros are not running?

    Many thanks in advance for your help,

    twills
    Last edited by twills; 10-20-2010 at 06:14 AM. Reason: Bad title

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: When will macro in module run when Application.EnableEvents is set to False?

    Events relate to specific Events assigned to specific Objects.

    For a Worksheet things like the Calculate event, SelectionChange event etc etc... "standard" macros are not affected by the temporary disabling of Events.

    see: http://www.cpearson.com/excel/Events.aspx

    Why disable them ?

    It follows that if you're running a Change event and part of that event involved updating the value of the Target cell you would end up in a perpetual loop were you not to disable events beforehand
    Last edited by DonkeyOte; 10-19-2010 at 07:36 AM.

  3. #3
    Registered User
    Join Date
    04-18-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: When will macro in module run when Application.EnableEvents is set to False?

    Thanks, DonkeyOte.

    The cpearson resource is excellent. Many thanks.

    twills

+ 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