Time Entry

  • Thread starter Thread starter Iladki
  • Start date Start date
I

Iladki

A simple problem I would appreciate your help with.

I have a work sheet with several cells where time is to be entered in the
format hh:mm. Unfortunately a lot of users are enetering it in the format
hh.mm.
Is there any way I can automatically convert to the right format, or not
accept the (.) but only (:).

Thanks for your help.
 
Private Sub Worksheet_Change(ByVal Target As Range)

If InStr(1, Target.Text, ":", vbTextCompare) < 1 Then
MsgBox "invalid entry"
End If

End Sub


Enter the above code in the sheets module



Mangesh
 
Back
Top