_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)
Syntax
'Declaration
Sub Save ( _
Filename As Object _
)
'Usage
Dim instance As _Application
Dim Filename As Object
instance.Save(Filename)
void Save(
Object Filename
)
Parameters
- Filename
Type: System.Object
Remarks
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.
Examples
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