LTL1963
New Member
- Joined
- Dec 10, 2004
- Messages
- 31
This works in Excel 2010, but not 2011.
This is a daily cost report that gets updated every day, the file makes a back-up before it posts/totals for any revisions.
In 2011 is saves to the wrong folder and wrong file name, file becomes foldername/DCR.xlsm or DCR/DCRBAK.xlsm.
This worked perfect in Excel 2003, then I had to add the new files extensions .xlsm for 2010 & 2011. I need it to work on a minimum of 2010 & 2011. It would be great if it still worked in 2003. Multiple people will use this with different versions of Excel.
2011 only like the .xlsm with macros or wants to strip out the macros.
I tried .xlsb, that wouldn't work.
This is a daily cost report that gets updated every day, the file makes a back-up before it posts/totals for any revisions.
In 2011 is saves to the wrong folder and wrong file name, file becomes foldername/DCR.xlsm or DCR/DCRBAK.xlsm.
This worked perfect in Excel 2003, then I had to add the new files extensions .xlsm for 2010 & 2011. I need it to work on a minimum of 2010 & 2011. It would be great if it still worked in 2003. Multiple people will use this with different versions of Excel.
2011 only like the .xlsm with macros or wants to strip out the macros.
I tried .xlsb, that wouldn't work.
Code:
Sub Save_After_Post()
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "/" & "DCR.xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
End Sub
Sub Save_Before_Post()
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "/" & "DCRBAK.xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
End Sub