I need to start a code if this condition is true:
if today is monday or saturday or ... then
call mycode
end if
i think is podssible also with select case, or not?
start code if today is monday or saturday
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78493
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: start code if today is monday or saturday
You can use
Code: Select all
Select Case Weekday(Date)
Case 2, 7 ' Monday / Saturday
' Do something
Case Else
' Do something else
End Select
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
Re: start code if today is monday or saturday
before you post and i read your solution...HansV wrote:You can use
Code: Select all
Select Case Weekday(Date) Case 2, 7 ' Monday / Saturday ' Do something Case Else ' Do something else End Select
If Weekday(Date) = vbTuesday Or Weekday(Date) = vbThursday Then
Call mycode
End If
wath you think about?
-
- Administrator
- Posts: 78493
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands