I have an xlsm file with a large macro in it. The macro processes the file, and prepares it for sending out via email. I'd like the last step of the macro to save the file as an xlsx, with a name specified via VBA.
When the macro gets up to this line of code:
ActiveWorkbook.SaveAs "C:\test.xlsm", FileFormat:=51
I get an error:
This extension cannot be used with the selected file type. Change the file extension in the File name text box or select a different file type by changing the Save as Type.
Can anyone help me?