I am using the following macro to convert an xls file to xlsx. The problem with it is the line that says SaveAs
. This creates a second file, one with the original xls extension and the second with the xlsx extension. If I simply say Save, I get an error. How can I either delete the xls file or have the macro do a Save instead of SaveAs? The reason we need to convert the file is so that when we email the file it is smaller in size.
Dim s As String
s = ActiveWorkbook.FullName
s = Replace(s, "xls", "xlsx")
ActiveWorkbook.SaveAs Filename:=s, _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False