I have the code below, where it will saveas the macro file to .xlsb file by removing the macro buttons and deleting few sheet and rows.
what I want is that before saving the file, I need clear filter from all the sheets in the work book and at the end .xlsb file should close
Note - If any other workbooks are open, no need to close that.
Sub create_customer_copy()
With ThisWorkbook
.Save
.saveas CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\" & Split(.Name, ".")(0) & Format(Date, "dd-mm-yyyy"), 50
End With
With Sheets("Savings_Summary")
.Rows.EntireRow.Hidden = False
.Rows(.Columns(1).Find("Sample_Dont_Delete", , xlValues, xlWhole).Row).Delete
.DrawingObjects.Delete
End With
Application.DisplayAlerts = False
Sheets("Sample_Dont_Delete").Delete
Application.DisplayAlerts = True
ActiveWorkbook.Save
End Sub
Bookmarks