Pages

Open save as dialog box with a file name

Some times we need to show save as dialog box for the user. Some times we need to show it with a  file name. Below is a code for that.

Dim IntialName As String
Dim fileSaveName As Variant
InitialName = "Result"
fileSaveName = Application.GetSaveAsFilename(InitialFileName:=InitialName, _
     fileFilter:="CSV (Comma delimited) (*.csv), *.csv")