Gruppe
Allgemein
Problem
Wie kann ich die Dauer der Laufzeit eines Makros feststellen?
StandardModule: basMain
Sub TimerTest()
Dim dteStart As Date, dteEnde As Date
Dim iCounter As Single
Application.ScreenUpdating = False
dteStart = Timer
For iCounter = 1 To 5000
If iCounter Mod 1000 = 0 Then
Application.StatusBar = _
"Besuche Zeile " & iCounter & "..."
End If
Cells(iCounter, 1).Select
Next iCounter
Range("A1").Select
Application.StatusBar = False
dteEnde = Timer
MsgBox "Bearbeitungszeit: " & Format _
(dteEnde - dteStart, "0.00") & " Sekunden..."
End Sub