Calculate/Display Times Greater Than 24 Hours in TextBox Control

  • Hi

    I have made a userform where I calculate how long time an operation takes. If the time fe.g. is 25 hours and 24 minutes then I get the result 1:24.

    I have attached my userform as it looks now. If you write 540 in the bar and 550 in volume and press "Beregn" then "Norm tid + 10%" will write 1:24 and not 25:24.

    Is it possible to have the Userform to write 25:24 or 1day and 1 hour and 24minutes?

    Thank you in advance.

  • Re: More Than 24 Hour In Userform

    The VBA Format does not support [hh]
    TextBox3.Text = Application.WorksheetFunction.Text(nomib, "[hh]:mm")
    TextBox4.Text = Application.WorksheetFunction.Text(maxb, "[hh]:mm")
    TextBox5.Text = Application.WorksheetFunction.Text(minb, "[hh]:mm")


  • Re: More Than 24 Hour In Userform

    Hi Andy

    Thank you for the help. It works perfect.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!