IsNumeric would be false for 10:30 and true for 10.5
If you use the textbox's Exit method to test for this you
can use
Cancel = NOT(Isnumeric(textbox1))or an IF statement to
display some message.
Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
Hello All,
Im currently trying to "Validate" a user form that Ive
used before but
had problems.
Its part of a Clocking-In process that measures time
spent at work.
The users of the form are asked how many hours they
worked.
At the moment the validation checks whether the Textbox
contains a
number or not (using IsNumeric) though there is nothing
that stops an
entry of 38:30:00, or similar, which causes me plenty of
headaches
later on.
Is there any way I can validate the TextBox to ensure
that numbers are
entered in the format - 38.50
(TensUnits.TenthsHundreths)?
If it makes any difference, the Userform doesnt paste to
the Worksheet
until a button is pressed
Many thanks in advance,
Eddie
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from
http://www.ExcelForum.com/
.