Share via


Workbook.Save Method

Excel Developer Reference

Saves changes to the specified workbook.

Syntax

expression.Save

expression   A variable that represents a Workbook object.

Remarks

To open a workbook file, use the Open method.

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

The first time you save a workbook, use the SaveAs method to specify a name for the file.

Example

This example saves the active workbook.

Visual Basic for Applications
  ActiveWorkbook.Save

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

Visual Basic for Applications
  For Each w In Application.Workbooks
    w.Save
Next w
Application.Quit

See Also