jono261970
Programmer
Hi,
Can somebody help me solve my problem. When the start time reaches say 07.00 it displays "enabled" and a msg box. I have now found out that it is going through this loop until the time reaches 07.01.
I set the time to hh:mm:ss and this solved the problem, however I use another form to set the start and stop times. I use a combo box to display all the hrs;
00:00 through to 24:00
I doesn`t look very good if I have to display the seconds as well.
00:00:00 through to 24:00:00
Private Sub Timer1_Timer()
Dim RAS As Integer
Dim wk(7)
Dim cnt As Integer
wk(1) = "Sunday"
wk(2) = "Monday"
wk(3) = "Tuesday"
wk(4) = "Wednesday"
wk(5) = "Thursday"
wk(6) = "Friday"
wk(7) = "Saturday"
cnt = Weekday(Now)
lblWkDay.Caption = wk(cnt)
LblTime.Caption = Time
Select Case Weekday(Now)
Case 2, 3, 4, 5, 6
If Format(Time, "hh:mm"
= startime Then lblStatus.Caption = "ENABLED":msgbox "test"
If Format(Time, "hh:mm"
= stoptime Then lblStatus.Caption = "DISABLED":msgbox "test"
Case Else
lblStatus.Caption = "DISABLED"
End Select
Can somebody help me solve my problem. When the start time reaches say 07.00 it displays "enabled" and a msg box. I have now found out that it is going through this loop until the time reaches 07.01.
I set the time to hh:mm:ss and this solved the problem, however I use another form to set the start and stop times. I use a combo box to display all the hrs;
00:00 through to 24:00
I doesn`t look very good if I have to display the seconds as well.
00:00:00 through to 24:00:00
Private Sub Timer1_Timer()
Dim RAS As Integer
Dim wk(7)
Dim cnt As Integer
wk(1) = "Sunday"
wk(2) = "Monday"
wk(3) = "Tuesday"
wk(4) = "Wednesday"
wk(5) = "Thursday"
wk(6) = "Friday"
wk(7) = "Saturday"
cnt = Weekday(Now)
lblWkDay.Caption = wk(cnt)
LblTime.Caption = Time
Select Case Weekday(Now)
Case 2, 3, 4, 5, 6
If Format(Time, "hh:mm"
If Format(Time, "hh:mm"
Case Else
lblStatus.Caption = "DISABLED"
End Select