Please If you can explain what I am doing wrong I would appreciate it..
Sequence of events..
1. I input the time needed (lets say 4 hours)
2. I capture system time as the start time
3. I capture system time as the stop time
4. At this point I call Partycal()
5. I modify the system time to work with it to find the remaining time left compared to the needed time.
At least I have tried to do..
6. Then I display the remaining hours and secs using what you see below.
Let's say that the needed time is 4 hours
Everytime I try to make provisons for a situation to where the remaining time is at let's say 3:01 getting ready to go to 2:59 I can't get it to 2 without screwing it all up and nothing works.
My goal is when I grab the stop time and it is lets say 30 mins left that it displays the time left properly. and that if I stopped it anytime during the the 4 hours it displays properly.
Am I doing something wrong or what..
I have left everything as is so you can tell I am new at this..
Private Sub Command14_Click() Label22.Caption = TimeValue(Now) STOPHOURS = Label22.Caption STARTH = Label9.Caption HOURSNDED = Label31.Caption Call PARTYCAL Label55.Caption = (REMAININGHOURS & ":" & REMAININGMINS) End Sub Public Sub PARTYCAL() STARTHOURS = Format((Val(Hour(STARTH))), "00") ' Start Hours STARTMINS = Format((Val(Minute(STARTH))), "00") 'Start Min STOPHOURSa = Format((Val(Hour(STOPHOURS))), "00") ' Stop Hrs STOPMINS = Format((Val(Minute(STOPHOURS))), "00") 'Stop Mins If STARTHOURS <= STOPHOURSa And STARTMINS < STOPMINS Then ELAPSEDHOURS = HOURSNDED - 1 ELAPSEDMINS = 60 - (STOPMINS - STARTMINS) End If 'If STOPHOURSa = STARTHOURS And STARTMINS >= STOPMINS Then ' ELAPSEDHOURS = HOURSNDED ' ELAPSEDMINS = 1 ' End If 'If STOPHOURSa > STARTHOURS And STARTMINS < STOPMINS Then ' ELAPSEDHOURS = STOPHOURSa - STARTHOURS ' ELAPSEDMINS = 60 - (STOPMINS - STARTMINS) ' End If ' If ELAPSEDMINS = 0 Then ' REMAININGHOURS = ELAPSEDHOURS - 1 ' End If REMAININGHOURS = ELAPSEDHOURS REMAININGMINS = ELAPSEDMINS 'Label64.Caption = (ELAPSEDHOURS & ":" & ELAPSEDMINS) 'Label55.Caption = (REMAININGHOURS & ":" & REMAININGMINS) End Sub