Private Sub btnTest_Click()
Dim start As Long
Dim i As Integer, j As Integer
Dim subForm As Form
For j = 1 To 10
For i = 0 To 30000
start = i
Next i
Next j
DoEvents
For j = 1 To 10
start = apiTimeGetTime
For i = 0 To 10000
Set subForm = Me.frmChilds.Form
Next i
Debug.Print j & " .=", apiTimeGetTime - start
DoEvents
start = apiTimeGetTime
For i = 0 To 10000
Set subForm = Me!frmChilds.Form
Next i
Debug.Print j & " !=", apiTimeGetTime - start
Debug.Print "-------------------"
DoEvents
Next j
End Sub
|