Thursday, 15 March 2012

Excel VBA code to SaveAs a specific filename and close the active workbook -


To save the active workbook as "finaloutput.xls", what do I need to add to the end of the existing subtype And then automatically closes the workbook without saving the changes?

You can use some such simplicity, which I have to activate the workbook to save the workbook After that put in another workbook and executed with the tool ... Macro Menu (Alt + F8).

  Public Sub SaveAsAndClose () ActiveWorkbook.SaveAs "finaloutput.xls" ActiveWorkbook.Close end sub  

No comments:

Post a Comment