Hi all,
I have a problem with textboxes in userform.
Basically i just want to display one cell with a timer inside through one textbox in my userform.
In C2 i have a timer and the cell format is "mm:ss", so the textbox2 should display that cell in that format but it seems so complicate.
If the "ControlSource" of textbox2 is C2, then the value is something like this: "6,94444444444444E-05".
So i've used the code below but the timer goes mad and goes directly to 12:00:00 in the c2 cell and 0,5 in the textbox
With this code there are no problems and the time is shown in hh:mm:ss but i need mm:ss
So i've changed it to
In this way the hours are hidden but the timer is freezed to 00:00 and i don't know why
Any solution for this problem? I can't belive there isn't an easy way to display in a textbox the content of a cell with timer inside.
Thank you so much for help
I have a problem with textboxes in userform.
Basically i just want to display one cell with a timer inside through one textbox in my userform.
In C2 i have a timer and the cell format is "mm:ss", so the textbox2 should display that cell in that format but it seems so complicate.
If the "ControlSource" of textbox2 is C2, then the value is something like this: "6,94444444444444E-05".
So i've used the code below but the timer goes mad and goes directly to 12:00:00 in the c2 cell and 0,5 in the textbox
VBA Code:
Private Sub TextBox2_Change()
TextBox2 = Format(TextBox2, "mm:ss")
End Sub
With this code there are no problems and the time is shown in hh:mm:ss but i need mm:ss
Code:
Private Sub TextBox2_Change()
TextBox2 = Format(TextBox2, "hh:mm:ss")
End Sub
So i've changed it to
Code:
Private Sub TextBox2_Change()
TextBox2 = Right(Format(TextBox2, "hh:mm:ss"), 5)
End Sub
In this way the hours are hidden but the timer is freezed to 00:00 and i don't know why
Any solution for this problem? I can't belive there isn't an easy way to display in a textbox the content of a cell with timer inside.
Thank you so much for help