Every 3rd Thursday

Rather than Weekday(Date) = 5 you can replace the 5 with enumerated VB constant for Thursday: vbThursday[/b].

i.e.

Code:
If (Day(Date) >= 15) And (Day(Date) <= 21) And Weekday(Date) = vbThursday Then 
    'Run backup 
End If
 
Weekday as a default uses vbsunday as start of week...
(which you are using as well)

However what is M$ desides to change that to "System settings" or (the international) vbMonday? Then your lost again.

Therefor my suggestion would be use: Weekday(Date,vbsunday) = vbthursday

Regards
 

Users who are viewing this thread

Back
Top Bottom