chart problem

  • You can also insert a line in your macro that turns off the event triggers whilke the macro is running. Be sure you turn them on when the macro ends, however.
    For example, before the macro writes anything to the worksheet put in the line

    Application.EnableEvents = False

    then your code


    Application.EnableEvents = True

    The Change even will not fire until the next change occurs. This should speed up things for you.

  • Hi Derk,
    Maybe I'm doing it wrong:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Application.EnableEvents = False


    Application.EnableEvents = True
    end sub
    This is not speeding up the process.
    Did I do something wrong?

  • Yep, putting the event disabler inside the event itself will have no effect. As the event has already been triggered.

    Try putting the Application.EnableEvents=False in the Userform Initialize event routine
    Application.EnableEvents=True in the Userform Terminate event routine.



Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!