View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Check hour format

Have you thought about using a different technique to get the time--maybe a
couple of spinners or scrollbars?

Bret Bernever wrote:

To fill out a form i'm asking the user to input time in 24 hour notation
in an inputbox. For example 13:30 or 21:45 or 08:30. Most users do that
correctly but some are messing things up by inputting all kinds of
invalid formats, something like:

08;30 (semicolon)
08.30 (dot)
08,30 (comma)
8 hour and 30 minutes (text)
"My start time is 8 o'clock and thirty minutes" (text, complete sentence
which is BS!)

So i'm looking for a routine thats checks the input and format that
input as hh:mm. When the users input is invalid - send him back to the
inputbox for a new attempt. Keep sending him back till the input is
valid (hh:mm).

--
With Kind Regards,
Bret Bernever

April 20, 1986
Celtics (135) - Bulls (131)
Larry Bird: "God disguised as Michael Jordan"


--

Dave Peterson