SaveAs Method

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.

FileNameRequired 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