WorkbookSaveAsk_ANmar

Asks user to save file (or workbook) using GetSaveAsFilename method.
Returns full path and file name if success, and blank if not
StartingFolder is optional, will use FixPath to return folder of this workbook if ignored.
ExtFilters has example of multiple filters in drop-down

Function WorkbookSaveAsk_ANmar(Optional StartingFolder = "This", Optional ExtFilters = "All Excel files, *.xls?,All files, *.*", Optional InitialFile = "Sheet1.xlsx")
 If StartingFolder = "This" Then StartingFolder = FixPath()
 ChDir StartingFolder
 Rett = Application.GetSaveAsFilename(InitialFile, ExtFilters)
 If Rett = "False" Then Rett = ""
 WorkbookSaveAsk_ANmar = Rett
End Function

Parameters

Optional StartingFolder, Optional ExtFilters

Views 118 Downloads 64

Perm link