M
Mark
Hello all,
I'm trying to use a time in a select case statment, along with the <>. It
doesn't work whith the <>. Is there a way to make this work?
vTime = Format(Time, "h:m")
vDate = Date
Select Case vTime
Case Is > "06:00"
If vTime < "17:59" Then
vSDate = vDate & " " & "6:00:00 AM"
vEDate = vDate & " " & "17:59:59 PM"
Else
vSDate = vDate & " " & "18:00:00 AM"
vEDate = DateAdd("d", 1, vDate) & " " & "05:59:59 PM"
End If
Case Is < "05:99"
vSDate = DateAdd("d", -1, vDate) & " " & "18:00:00 AM"
vEDate = vDate & " " & "05:59:59 PM"
End Select
I'm trying to use a time in a select case statment, along with the <>. It
doesn't work whith the <>. Is there a way to make this work?
vTime = Format(Time, "h:m")
vDate = Date
Select Case vTime
Case Is > "06:00"
If vTime < "17:59" Then
vSDate = vDate & " " & "6:00:00 AM"
vEDate = vDate & " " & "17:59:59 PM"
Else
vSDate = vDate & " " & "18:00:00 AM"
vEDate = DateAdd("d", 1, vDate) & " " & "05:59:59 PM"
End If
Case Is < "05:99"
vSDate = DateAdd("d", -1, vDate) & " " & "18:00:00 AM"
vEDate = vDate & " " & "05:59:59 PM"
End Select