#1   Report Post  
Iladki
 
Posts: n/a
Default Time Entry

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.


  #2   Report Post  
mangesh_yadav
 
Posts: n/a
Default


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


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=378378

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
enter a time into a cell, have the cell show two times the entry johnp Excel Worksheet Functions 3 May 2nd 05 12:08 AM
unmet challenge boris Excel Worksheet Functions 2 March 16th 05 03:13 PM
Time entry leah Excel Discussion (Misc queries) 9 January 18th 05 02:47 PM
Time Format Auto Entry AM and PM BulaMan Excel Discussion (Misc queries) 1 December 15th 04 10:30 AM
Time Entry mike47338 Excel Worksheet Functions 3 November 18th 04 10:02 PM


All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"