I have a macro that creates a new xlxs file which I want to save with a name passed to the macro via the clipboard. This code works in Excel 2011, saving the file in the same folder as the file running the macro.
ActiveWorkbook.SaveAs FileName:=FileName, _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
but it fails in Excel 2016.
I want a format that works in both. I have the option of passing a specific file path to the macro if that will help, in fact that was where I started out but got tangled up in the differing path protocols for 2011 and 2016.
What's the simplest solution?
Bookmarks