Hi, all,
This is sort of related the post below but with a slight twist.
http://www.excelforum.com/showthread...highlight=date
I would like to create a macro that saves and names a file with the current date and the day after. The code below works, but is somewhat limited.
Sub SaveFileWithDate()
MyMonth = Left(MonthName(Month(Date)), 3)
MyDay = Day(Date)
MyDay1 = Day(Date + 1)
MyFileName = "Schedule " & MyMonth & " " & MyDay & " - " & MyMonth & " " & MyDay1 & ".xls"
ActiveWorkbook.SaveAs Filename:="C:\Admin" & MyFileName, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close
Workbooks.Open "C:\Admin" & MyFileName
End Sub
What I want is for the macro to only input weekdays. In other words if I run the macro on Fri. 4/11, I want it to name the file "Schedule April 11 - April 14." In this case 4/14 is a Mon. So the macro skips the weekend dates.
Is there anyway for this to work? Any help would be greatly appreciated.
Bookmarks