• Ignore all Worksheet_Activate events

    Author
    Topic
    #463433

    Hi,

    I have one macro, that when running, I would like all Worksheet_Activate events to be ignored. Is this possible?

    Thanks

    Viewing 4 reply threads
    Author
    Replies
    • #1183022

      You can turn off ALL event handling with the line

      Application.EnableEvents = False

      Don’t forget to turn it on again at the end using

      Application.EnableEvents = True

      (it’s not reset automatically!)

    • #1183036

      Thanks Hans.

    • #1183089

      Depending on what the code is, you might also simply be able to stop activating the sheets in the first place!

    • #1183156

      Over time as my vba knowledge had increased, my use of select has decreased a lot. However, I must admit that I am still not fully sure where select is necessary and where it is not. It is definately an area that I should brush up on!

      • #1183310

        Your best bet is to assume you don’t need to select…

        I would be hard pressed to find an instance where SELECTing is required.

        Steve

    • #1183312

      Freeze panes and checking some relative conditional formats are the only ones I can think of offhand.

    Viewing 4 reply threads
    Reply To: Ignore all Worksheet_Activate events

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: