_Application.Save method

Saves changes to the specified workbook.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

void Save(
	Object Filename
)

Parameters

Filename
Type: System.Object

To open a workbook file, use the ["M:Microsoft.Office.Interop.Excel.Workbooks.Open(System.String] method.

To mark a workbook as saved without writing it to a disk, set its SaveData property to True.

The first time you save a workbook, use the ["M:Microsoft.Office.Interop.Excel._Workbook.SaveAs(System.Object] method to specify a name for the file.

This example saves the active workbook.

ActiveWorkbook.Save

This example saves all open workbooks and then closes Microsoft Excel.

For Each w In Application.Workbooks     w.SaveNext w Application.Quit
Show: