Excel VBA AI Assistant LogoExcel VBA AI Assistant
    Performance
    VBA
    ScreenUpdating
    Calculation
    Events
    Featured

    ScreenUpdating, Calculation & Events: Speed Up Your Macros Tenfold

    Speed up heavy tasks by temporarily disabling ScreenUpdating, switching calculation to manual, and turning off events.

    VBA AI Team
    Published on August 17, 2025
    12 min read

    ScreenUpdating, Calculation & Events: Speed Up Your Macros Tenfold

    Control Excel’s global settings to avoid unnecessary work.


    Template

    Sub WithToggles() Dim oldCalc As XlCalculation, oldEvents As Boolean, oldSU As Boolean oldCalc = Application.Calculation oldEvents = Application.EnableEvents oldSU = Application.ScreenUpdating On Error GoTo CleanUp Application.Calculation = xlCalculationManual Application.EnableEvents = False Application.ScreenUpdating = False ' ... heavy operations ... CleanUp: Application.Calculation = oldCalc Application.EnableEvents = oldEvents Application.ScreenUpdating = oldSU End Sub

    Always restore previous values in a CleanUp block.

    Work faster with the VBA Assistant

    Create, explain, and improve your VBA code with examples, comments, and best practices—directly in your workflow.