VBA: Whole number convert to hh:mm

Hudas

Registered User.
Local time
Today, 05:12
Joined
May 13, 2013
Messages
55
Hi -

I need help,i have a textbox that I put in minutes as whole number. What i want is to put in AfterUpdate Event to convert that whole number to hh:mm....

Thank you

Hudas
 
Ok, so what have you done and how many people died when it failed?
 
Hello Hudas I am not a pro but enjoy having a go . My solution would be to create a function with the formula and have the after update event call it .I have attached a little demo. When you look at the code for the function you will see hh and mm , You can change these to Hours and Minutes if you require .

Please let me know it this what you are trying achieve

Regards
 

Attachments

Hello ypma,

Thank you very much, I just modified a bit the function you made.

Me.txtbxMinutes = Format([txtbxMinutes] \ 60, "00") & ":" & Format([txtbxMinutes] Mod 60, "00") & ":00"

What I do is just type the number in the Me.txtbxMinutes for example 63, it will then be formatted to 01:03:00. Thanks to you we were able to make it work!

Hudas
 
Hello again Hudas , Thank you for your feedback, it make me feel good that i could point you in the right direction

Regards
 

Users who are viewing this thread

Back
Top Bottom