format textbox to time

A

ASU

Need help on this one. How do I format a textbox, embeded in a userform, so
that when I type the hour 2130 it displays 21:30.
 
M

Marcelo

hi Asu

assuming that the 2130 is on the C8

=abs(left(c8,2)&":"&(right(c8,2))

format as 13:30:55

hope this helps
regards from Brazil
Marcelo

"ASU" escreveu:
 
H

Harald Staff

Hi ASU

What do you want entry 12 to be ? 00:12 or 12:00 ? And what about 12.5 ? Is
it 12:30 or 12:50 ? (Believe me, your users will enter all kinds of crap so
prepare for absolutely every possibility)

Best wishes Harald
 
A

ASU

Not quit what I was looking for. I`v got a userform with textboxes, two of
does textboxes I would be able to write a time, say 2130. And the textbox
value comes up with 21:30.
 
Top