SaveAs Method

Microsoft Graph Visual Basic

SaveAs Method


Saves changes to the graph in a different file.


expression   Required. An expression that returns one of the objects in the Applies To list.

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
    fName = Application.GetSaveAsFilename
Loop Until fName <> False
NewBook.SaveAs Filename:=fName