On Aug 16, 5:11*pm, "JP Ronse" wrote:
Hi Rob,
As before,
use timevalue(me..TextBox3.text)
AFAIK Excel cannot handle negative times.
Wkr,
JP"robzrob" wrote in message
...
In a UserForm I've got a TextBox asking for an amount of time (hours
and minutes). *It could be negative. *If the user wants to enter a
negative date, I want them to be able to just enter, for example:
-3:04, -10:53, etc. *I'm in 1904 mode. *My code for this value is:
Worksheets("Leave").Range("K5").Value = UserForm1.TextBox3.Value
I've tried inputting times like this: -3:04 and this: -"3;04", but
neither will do.- Hide quoted text -
- Show quoted text -
I'm in 1904 mode - which can handle negative dates - and it does in
the workbook itself, ie not in VBA - when I'm subtracting 2 dates
which are already in cells to give a -ve time result in another cell.
It just won't work with the UserForm.