[英]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?如果我在周五(周一)发送报告,我该怎么办?
eg:例如:
When I send the Report on Friday which is For Monday I get the date Report for - Saturday, April 18, 2015当我在星期五即星期一发送报告时,我得到了日期报告 - 2015 年 4 月 18 日星期六
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.