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


    then


    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


    code


    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
    and
    Application.EnableEvents=True in the Userform Terminate event routine.


    Cheers
    Andy

    [h4]Cheers
    Andy
    [/h4]