AW: Shortcut für "Zurücksetzen"
19.12.2012 09:33:48
Albert
Guten Morgen Ransi,
logisch...
Hier der Code.
Private Sub Start_Zeitaufnahme_Click()
If Start_Zeitaufnahme.Value = False Then _
With Start_Zeitaufnahme
.Caption = "Start der Zeitaufnahme"
.BackColor = RGB(22, 149, 5)
End With
bStop = True 'Stop der Stoppuhr
i = Sheets("Zeitentabelle").Cells(Rows.Count, "D").End(xlUp).Row + 1
Cells(i, "D").Activate
Cells(i, "D").Value = Range("D1")
i = Sheets("Zeitentabelle").Cells(Rows.Count, "D").End(xlUp).Row
Cells(i, "A").Activate
Cells(i, "A").Value = "Beenden der Zeitaufnahme"
i = Sheets("Zeitentabelle").Cells(Rows.Count, "D").End(xlUp).Row
Cells(i, "C").Activate
Cells(i, "C").Value = "XXXXX"
i = Sheets("Zeitentabelle").Cells(Rows.Count, "D").End(xlUp).Row
Cells(i, "F").Activate
Cells(i, "F").Value = "0"
SendKeys ("%RR") 'HIER LIEGT DER FEHLER!!!!!!
End If
'Start der Stoppuhr
If Start_Zeitaufnahme.Value = True Then _
With Start_Zeitaufnahme
.Caption = "Zeitaufnahme läuft"
.BackColor = RGB(255, 0, 0)
End With
i = Sheets("Zeitentabelle").Cells(Rows.Count, "A").End(xlUp).Row + 1
Cells(i, "D").Activate
Cells(i, "A").Value = "Start der Zeitaufnahme"
Cells(i, "F").Value = "0"
Cells(i, "C").Value = "XXXXX"
Cells(i, "D").Value = Format(lngR + 3 / 86400, "000") & ":"
Cells(i, "D").Value = Time
On Error Resume Next
Do
DoEvents
Range("D1") = (Timer - dblT) / 86400
DoEvents
Loop While bStop = False
End If
End Sub
VG
Albert