I have added a button in excel sheet and now when I click that button it saves the sheet at specific path with specific name but in pdf format.
I want to save this sheet simply in excel format (.xlsx). so
Sub PDFActiveSheet2()Dim ws As WorksheetDim strFile As StringOn Error GoTo errHandlerstrFile = "m:\formats\"& Range("H8")Set ws = ActiveSheetws.ExportAsFixedFormat _ Type:=xlTypePDF, _ Filename:=strFile, _ Quality:=xlQualityStandard, _ IncludeDocProperties:=True, _ IgnorePrintAreas:=False, _ OpenAfterPublish:=FalseMsgBox "file has been created."exitHandler: Exit SuberrHandler: MsgBox "Could not create the file" Resume exitHandlerEnd Sub
What do I need to change?