home *** CD-ROM | disk | FTP | other *** search
-
- Private Sub cmdTest_Click()
-
- Dim Start, Finish, TotalTime
-
- If Option1.Value = True Then
- Start = Timer
-
- 'Put the code you wish to time
- 'here!
-
- 'End of Code time test
- Finish = Timer
- Else
- 'Option 2 selected
- Start = Timer
-
- 'Put the code you wish to time
- 'here!
-
- 'End of Code time test
- Finish = Timer
-
- End If
-
- TotalTime = Finish - Start ' Calculate total time.
-
- '
- 'Set up display results
- '
- If Option1.Value = True Then
- 'Option 1
- lblOpt1.Caption = "Total time to execute " & _
- Option1.Caption & ": " & _
- TotalTime
- Else
- 'Option 2
- lblOpt2.Caption = "Total time to execute " & _
- Option2.Caption & ": " & _
- TotalTime
-
- End If
-
- End Sub
-