Hi all,
I'm having a bit of problem with the code below. It is part of a user form which is used to input a start and end time for an event. It all seems to work fine EXCEPT when the time I input is 12:00. 11:45 and 12:15 both work ok, so I have no idea what is wrong!
The line that fails is the 'Format' line - it appears not to like the value of 0.5 (12:00) - any ideas why?
Thanks again!
I'm having a bit of problem with the code below. It is part of a user form which is used to input a start and end time for an event. It all seems to work fine EXCEPT when the time I input is 12:00. 11:45 and 12:15 both work ok, so I have no idea what is wrong!
Code:
Private Sub StartTime_Change()
StartTime = Format(StartTime, "hh:mm")
If StartTime > EndTime Then
EndTime = StartTime.Value
End If
End Sub
The line that fails is the 'Format' line - it appears not to like the value of 0.5 (12:00) - any ideas why?
Thanks again!