I try to save a new file .xlsx with the name of the worksheet, it works with .xls but I needed in a new version. Txs
The code I'm using is:
![]()
Sub save_active () 'when I change it to ".xlsx" It doesnt work 'display the msg "file is corrupted" MName = ActiveSheet.Name & ".xls" MDir = ActiveWorkbook.Path ActiveWorkbook.SaveAs Filename:=MDir & "\" & MName End Sub
Bookmarks