Hello,
after add 12:00 displays on userform in textbox change to 0:05 ?
please help me ,,,
Please Login or Register to view this content.
Hello,
after add 12:00 displays on userform in textbox change to 0:05 ?
please help me ,,,
Please Login or Register to view this content.
Last edited by max-7; 08-01-2016 at 09:30 AM.
Hi, welcome to the forum
why would you want 12 hours to show as 5 minutes?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
I need wirte 12:00 show same 12:00
no need to change to 0:05
this change come an automatic
Is it possible to help me ,,,
Is there a way to solve this problem?
Hi,
12:00 is equal to half a day because Excel holds date/time values as the number of days from 1st January 1900 (or 1904 on a Macintosh).
Thus your program flow is to load 0.5 into the textbox in the Initialize event. This is stored as text, hence "0.5". Unfortunately, Format("0.5", "hh:mm") is not the same as Format(0.5, "hh:mm"). The former returns 00:05 rather than the latter's 12:00 presumably interpreting the full stop as a delimiter between hours and minutes when coercing the string to a true time value.
To avoid this you may simply format the cell value when you load it into the textbox.
Please Login or Register to view this content.
Don
Please remember to mark your thread 'Solved' when appropriate.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks