SaveAs method (Excel Graph)
Saves changes to the graph in a different file.
expression.SaveAs (FileName)
expression Required. An expression that returns one of the objects in the Applies To list.
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. |
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
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.