Okay; I have this great script I added to our logon script that will tell if
it is the day to turn in your timesheet (every other friday). What I would
like to do is either augment this one or use another one that I can use on
our website to determine when the next date to turn in your timesheet is or
the next pay date (which is the opposite friday). Is there an easy way to
calculate what the next one is? I assume it is some do until statement, but
am unsure. If the formula works correctly, the output should be July 2,
2004 if ran right now
' use ISO date format yyyy-mm-dd so it is unambiguous!
sFirstFriday = "2003-04-25"
If Weekday(Now) = vbFriday Then
iDeltaWeeks = DateDiff("w", sFirstFriday, Now)
iEvenOdd = iDeltaWeeks Mod 2
If iEvenOdd = 0 Then
MsgBox "Remember to complete your time sheet today and turn it into to
your supervisor", vbOKOnly + vbExclamation, "Reminder"
End If
End If
--
Robert Cohen
A legend in his own mind
--