Hi, I am preparing for VB certification exam and have a question about debugging Watch window. I hope someone can me some input. The following is the code I tried to use Watch window to monitor. However, every time, I add variables counter and intNum into Watch window. The value column shows <Out of Context>. I know I should redefine the scope for these variables but how? Where have I done wrong?
*******************************
Private Sub Command1_Click()
Dim counter As Integer
Dim intNum(100) As Integer
For counter = 1 To 100
intNum(counter) = counter * 5
Me.ProgressBar1.Value = counter
Debug.Print counter
Next counter
Me.ProgressBar1.Value = Me.ProgressBar1.Min
End Sub
Thank you
Cowper
*******************************
Private Sub Command1_Click()
Dim counter As Integer
Dim intNum(100) As Integer
For counter = 1 To 100
intNum(counter) = counter * 5
Me.ProgressBar1.Value = counter
Debug.Print counter
Next counter
Me.ProgressBar1.Value = Me.ProgressBar1.Min
End Sub
Thank you
Cowper