Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
I am trying to populate a userform textbox with the difference between two times found in two other textboxes of the same userform.
Textboxes cu2_start = "7:00 AM" and cu2_end = "15:00". I am looking to populate cu2_hours with "8.00".
I have this line of code
It's giving me an answer of -.13. Clearly there is something wrong with my formula.
Textboxes cu2_start = "7:00 AM" and cu2_end = "15:00". I am looking to populate cu2_hours with "8.00".
I have this line of code
Code:
.cu2_hours.Value = format(DateDiff("h", .cu2_end.Value, .cu2_start.Value) / 60, "0.00")
It's giving me an answer of -.13. Clearly there is something wrong with my formula.