>I want my Text2 text box will get the time format result according to the Text1.Text, for example:
>If 12 entered on Text1, the Text2 will displayed 00:00:12,
>If 22" entered on Text1, the Text2 also displayed 00:00:22
>If 1:12" entered on Text1, the Text2 will displayed 01:12
>
>I have tried the following codes, but does not work:
>Text2.Text = Format(Text1.Text,"Hh:Nn:Ss")
>
>Any body can give me Tips and Tricks for the above problem?.. any idea or suggestion is highly appreciated and thank you in advance..
>
>Best Regards
>Winan
Hi,
Use the Timeserial function to convert the values in Text1 to a time, then format will work. You will need to parse out the hours, minutes and seconds from text1, and convert them to numbers.
e.g.
debug.print Timeserial(23, 10, 34)
23:10:34
debug.print format( Timeserial(23, 10, 34), "hh:mm:ss")
23:10:34 - This will be a string.