RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
- 2010
- Platform
- Windows
Hi there, I have a userform with 2 textboxes. One is called 'Time and one is called 'mins'
I'm trying to get the 'Time' textbox to reflect 'mins' textbox in hours and mins ie:
mins = 345 therefore Time = 5:45
I thought I could use something along the lines of:
or
but both just change Time to 0:00
If you can point me in the right direction, I'd be very happy
Thanks
I'm trying to get the 'Time' textbox to reflect 'mins' textbox in hours and mins ie:
mins = 345 therefore Time = 5:45
I thought I could use something along the lines of:
Code:
Sub mins_Change()
Dim minsVar
minsVar = Me.mins.Value
Me.Time.Value = Format(minsVar, "h:mm")
End Sub
or
Code:
Sub mins_Change()
Dim minsVar
minsVar = Me.mins.Value
Me.Time.Value = Application.WorksheetFunction.text(minsVar, "h:mm")
End Sub
but both just change Time to 0:00
If you can point me in the right direction, I'd be very happy
Thanks