I've been working on and developing an exported report via Excel and VBA and had originally set it up to be a monthly workbook. However, I need to make it more of a End of Week up to the last day of the month. Basically, I'm going to have monthly folders, and weekly workbooks. I fully know how to calculate End of week using...
and EOM by using...
But what I am wanting do do is See if the end of the month is in that week, and before the end of the week. That way it stops that weeks workbook on the last day of the month.
Example would be how 12/31/2019 fell on Tuesday this year. So the last "week" workbook would end on Tuesday for December and the first "week" workbook of January would start on Wednesday. Any thoughts help on this issue will be appreciated. Thanks.
Code:
WEdate = Format(Now() - Weekday(Now()) + 6, "mm-dd-yyyy")
Code:
Function GetNowLast() as Date
dYear = Year(Now)
dMonth = Month(Now)
getDate = DateSerial(dYear, dMonth + 1, 0)
GetNowLast = getDate
End Function
Example would be how 12/31/2019 fell on Tuesday this year. So the last "week" workbook would end on Tuesday for December and the first "week" workbook of January would start on Wednesday. Any thoughts help on this issue will be appreciated. Thanks.