I am trying to create a script that will allow for me to to save a file as the previous month and also display the corresponding year. The script that I have below is getting me close to what I want but its saving the file as the current month. I know that what I have below isnt going to yield me the results that I am looking for but this is where i get stuck.
I would like for it to read as follows: Student Report 03-2010
TempFilePath = Application.DefaultFilePath
TempFileName = "Student Report" & Format(Now, "mm-yyyy")
With Destwb
.SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
.Close SaveChanges:=False
End With
I would like for it to read as follows: Student Report 03-2010
TempFilePath = Application.DefaultFilePath
TempFileName = "Student Report" & Format(Now, "mm-yyyy")
With Destwb
.SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
.Close SaveChanges:=False
End With