Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Saves changes to the graph in a different file.
Syntax
expression.SaveAs (FileName)
expression Required. An expression that returns one of the objects in the Applies To list.
Parameters
| Name | Required/Optional | Data type | Description |
|---|---|---|---|
| FileName | Required | String | A string that indicates the name of the file to be saved. You can include a full path; if you don't, Microsoft Excel saves the file in the current folder. |
Example
This example creates a new workbook, prompts the user for a file name, and then saves the workbook.
Set NewBook = Workbooks.Add
Do
fName = Application.GetSaveAsFilename
Loop Until fName <> False
NewBook.SaveAs Filename:=fName
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.