0m3r
0m3r

Reputation: 12497

Format for future date

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

Answers (1)

brettdj
brettdj

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

Related Questions