Good morning 6StringJazzer and all.
I've tried the suggested code, but I still cannot get it to work.
Below is as near of a copy of my code as I can provide except the UserForm itself.
Basically I have created a UserForm with three Text Boxes (TextBox1, TextBox2 and TextBox3) which receive
1) The first two boxes accept user input in 24 hour military time (0001 to 2359)
2) The third a decimal "period" separated hours slept (e.g 1.0 - 8.5)
I copy those values into three string variables in my code (TextBoxStart = TextBox1.Value, TextBoxWake = TextBox2.Value and TextBoxSlept = TextBox3.Value)
Have applied the suggested code and get the following into TimeSlept "1/8/1900 12:00 PM" from the operation (TimeSlept = ((1 - StartTime) + WakeTime) * 24)
The purpose of my code is to compare programmatically the user provided "time slept" to the time spent (or not) in bed. The problem is the time spanning past midnight.
Any help to understand how to accomplish this is greatly appreciated.
Code snippet
****************************************************************************
Bookmarks