Time Entry

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.
 
M

mangesh_yadav

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top