VBA Debug Part 2

In this video I talk about VBA Debug aspects like the Immediate Window, Local Window and Watch Window.

…also we use the “debug.print” statement to print a value to the Immediate window.

The Local Window is useful to view the current state of all the variables present in the current sub procedure.

The Watch Window is useful on long running processes that you don’t want to step through line by line. In the example we want to “watch” and set a breakpoint when a variable’s value becomes 20. We don’t want to set a breakpoint and step through each time the variable changes, 100 times, so a breakpoint would be too time consuming.

Private Sub watch()
    Dim x As Integer
    Do Until x = 100
        Debug.Print x
        x = x + 1
End Sub

<< VBA Debug Part 1 | VBA Error Handling PT1 >>

Click here for VBA debugging related posts.

Offsite Related Information:

“Go Fund Me” Page

($5 suggested amount)

(…10% of your gift amount will go to charity)

Free! Subscribe To Our YouTube Channel!

Free MS Access VBA Programming Course

Tags: , , , , ,

Leave a Reply