Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,616
- Office Version
- 365
- 2016
- Platform
- Windows
In my userform, I enter 8:00 into textbox 'cu2_start'. This represents 8:00 AM.
This line converts the text time to a decimal time value ... in this case etc_cu2 = "0.33333"
I am failing with my attempts with the code above to add 8 hours to 'etc_cu2' in order to have 16:00 (4:00 PM) into textbox cu2_end. 'cu2_end' displays as 08:00 with this code.
Can anyone suggest a solution to the problem I am having?
Code:
etc_cu2 = format(CDate(cu2_start.Value), "0.00000")
Code:
hj = etc_cu2 + 8
cu2_end.Value = format(hj, "hh:mm")
I am failing with my attempts with the code above to add 8 hours to 'etc_cu2' in order to have 16:00 (4:00 PM) into textbox cu2_end. 'cu2_end' displays as 08:00 with this code.
Can anyone suggest a solution to the problem I am having?