Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
This line of code:
Appears to be successfully triggering when rounded svc_off (time) variable falls within a time range defined by rounded crw_st and rounded crw_ed.
From a loop of 12 rows of data each with different values of crw_st and crw_ed, 6 pass the criteria. (svc_off falls between the defined time range for that row)
The remaining 6 do not. I am trying to trigger code when the opposite of above occurs ... the svc_off is not in the rame range. So, I tried this code:
However, I must have something out of place as it's not triggering when svc_off isn't in the time range.
Code:
If Round(svc_off, 3) >= Round(crw_st, 3) And Round(svc_off, 3) <= Round(crw_ed, 3) Then
From a loop of 12 rows of data each with different values of crw_st and crw_ed, 6 pass the criteria. (svc_off falls between the defined time range for that row)
The remaining 6 do not. I am trying to trigger code when the opposite of above occurs ... the svc_off is not in the rame range. So, I tried this code:
Code:
If Not Round(svc_off, 3) >= Round(crw_st, 3) And Not Round(svc_off, 3) <= Round(crw_ed, 3) Then
However, I must have something out of place as it's not triggering when svc_off isn't in the time range.