Reputation: 12497
I am using a macro to send reports Monday to Friday.
.Subject = "Report For - " & Format(Now + 1, "Long Date")
How do I if I am sending the report on Friday which is for Monday?
e.g:
When I send the Report on Friday which is For Monday I get the date Report for - Saturday, April 18, 2015
Upvotes: 1
Views: 624
Reputation: 55692
This code will pick the next day for Sunday-Thursday
It will pick Monday for Friday and Saturday
Dim strIn As String
Select Case Weekday(Now)
Case 1 To 5
strIn = "Report For - " & Format(Now + 1, "Long Date")
Case Else
strIn = "Report For - " & Format(Now + (9 - Weekday(Now)), "Long Date")
End Select
Upvotes: 1