Consulting

Results 1 to 3 of 3

Thread: Solved: stops all other macros except this one

  1. #1

    Solved: stops all other macros except this one

    Hi all,
    short question.
    Is it possible with any command in vba stop all other macros during running this macro, where the commad is written?

    i mean i have macro "main" but i have other macros, e.g. if something in sheets is changed "change", it write log , checking cells "checking" and other...

    i want, if i run "main" it stops all other macros, whichg will be run..."change", "checking" and other..

    thx for help

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [VBA]
    Application.EnableEvents = False
    [/VBA]

    Remember to reset to true on completion. It is safer using it with Error Handling as it will not reset automatically.

    [VBA]
    Sub Test()
    On Error GoTo Exits
    Application.EnableEvents = False

    'Do your stuff

    Exits:
    Application.EnableEvents = True
    End sub
    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    THANK you m8.

Posting Permissions

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