I have an excel template that uses a macro to save the file, so that the users maintain standardized file name formats. I created the code using Excel 2003. the code is as follows:
Sub SaveBook()
Dim sFile As String
sFile = "ConsolidatedDemand" & "_" & Format(Now(), "yyyy.mm.dd") & ".xls"
ActiveWorkbook.SaveAs Filename:= "\\file location\" & sFile
End Sub
I have one user who uses Excel 2007. When they try to run the macro, they recieve an error: "The following features can not be saved in macro-free workbooks: VB project. To save a file with these features, click No, and then choose macro-enabled file type in the file type list. To continue saving as a macro-free workbook, click yes"
I tried chaing the file extension to ".xlsm" in the second line of code, but that yielded the same error message. Any other ideas of how I can modify this code so that it will work for Excel 2007 users?