+ Reply to Thread
Results 1 to 5 of 5

macroB to not activate when macroA is executing

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    macroB to not activate when macroA is executing

    hello

    i have the following macro that filters data when i press a button. the macro goes into "master" sheet, however the macro on the master sheet is "Private Sub Worksheet_Activate()" so each time you jump to that sheet, it runs that macro.

    is there a way when i run my macro (see below), it disables the macro in the master sheet?

    Please Login or Register  to view this content.
    any help would be truly appreciated.
    Last edited by jw01; 10-30-2012 at 10:14 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: macroB to not activate when macroA is executing

    You could rewrite the code so it doesn't activate the sheet.

    Alternatively you can disable events at the start.
    Please Login or Register  to view this content.
    Remember to re-enable events at the end.
    Please Login or Register  to view this content.
    Last edited by Norie; 10-30-2012 at 09:43 PM.

  3. #3
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: macroB to not activate when macroA is executing

    hello

    should i just place this at the beginning and at the end..or a particular spots?

    thx u sir.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: macroB to not activate when macroA is executing

    You disable events at the start and enable them at the end.

    PS I edited my post - got the code for enabling slightly wrong.

  5. #5
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: macroB to not activate when macroA is executing

    awesome that works great...thx u sir!

+ 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