Hi there,
You'll need to take a look at the Weekday method which you can find in the
Windows Script section of the MSDN:
The
Weekday method returns a 1 based number for the current day of the week, starting at 1 for a Sunday by default.
So, this should work:
Code:
If Weekday(dtNow) = Weekday(Now()) Then
str.... etc
End If
Or, when you need multiple days, use a Select Case statement:
Select Case Weekday(dtNow)
Case 1 ' Sunday
...
Case 2 ' Monday
etc etc
End Select
or define constants for the weekdays if you need them more often, to improve the readability of the code:
Code:
Dim vbSunday
Dim vbMonday
...
vbSunday = 1
vbMonday = 2
...
Select Case Weekday(dtNow)
Case vbSunday
...
Case vbMonday
etc etc
End Select
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.