O
Ofer
Hi,
I have written the following code to add time without semicolon to my
time sheet
all works well but I have this annoying blinking when i'm
deleting/resetting a cell after typing
time in it.
Private Sub Worksheet_Change(ByVal Target As Range)
If ((Target.Column = 2) Or (Target.Column = 3)) And ((Target.Row >=
5) And (Target.Row <= 35)) Then
If IsNumeric(Target) Then
Application.EnableEvents = False
Target = Target / 2400
Target.NumberFormat = "h:mm"
Application.EnableEvents = True
If ((Target = "00:00:00") Or (Target = "00:00") Or (Target
= "0")) Then
Target.NumberFormat = "General"
Application.EnableEvents = True
Target = ""
End If
End If
End If
End Sub
can someone point out the annoying blink cause?
Thanks
I have written the following code to add time without semicolon to my
time sheet
all works well but I have this annoying blinking when i'm
deleting/resetting a cell after typing
time in it.
Private Sub Worksheet_Change(ByVal Target As Range)
If ((Target.Column = 2) Or (Target.Column = 3)) And ((Target.Row >=
5) And (Target.Row <= 35)) Then
If IsNumeric(Target) Then
Application.EnableEvents = False
Target = Target / 2400
Target.NumberFormat = "h:mm"
Application.EnableEvents = True
If ((Target = "00:00:00") Or (Target = "00:00") Or (Target
= "0")) Then
Target.NumberFormat = "General"
Application.EnableEvents = True
Target = ""
End If
End If
End If
End Sub
can someone point out the annoying blink cause?
Thanks