I want to save the current xlsm file as xlsx, so i wrote a code as below. This code really done it job and i able to see the file saved as Myfile.xlsx as what i\'ve defined in t
This will avoid the extra copy:
Sub saveAsXlsx()
Dim myPath As String
myPath = Application.ActiveWorkbook.Path
Worksheets(Array("sheet1", "sheet2")).Copy
ActiveWorkbook.SaveAs Filename:=myPath & "\Myfile.xlsx"
ActiveWorkbook.Close
End Sub
This uses SaveAs rather than SaveCopyAs since you already have created the first copy.