Hello Experts:
The following macro, in Module 1 of a XLSM file, falls short of the goal... to save the active worksheet, sans macros, to a file in the same directory as the active file, with a name that begins with a fixed text "WTS_" followed by current year, "_", tab name of active sheet, ".xls".
Resultant filename will look similar to: "WTS_2012_7-8"
Thanks for your help
Dim sCopyName As String
sCopyName = "WTS_" & Format(Now, "yyyy") &"_"&{active tab name here}& ".xls"
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:=sCopyName, FileFormat:=xlOpenXMLWorkbook
ActiveWindow.Close
End Sub
Our community of experts have been thoroughly vetted for their expertise and industry experience.