Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
Eingabe
As
Variant
On
Error
GoTo
fehler1
If
Not
Intersect(Target, Range(
"C2,H2,F37,F43,C5:E35"
))
Is
Nothing
Then
Application.EnableEvents =
False
With
Target
If
Not
IsNumeric(.Value)
Then
GoTo
fehler1
If
IsEmpty(Target)
Then
Target.Value =
""
GoTo
fehler1
End
If
.Value = Left(Format(Target,
"0000"
), 2) &
":"
& Right(Target, 2)
.NumberFormat =
"[hh]:mm"
End
With
End
If
fehler1:
Application.EnableEvents =
True
End
Sub