Asks user to browse to a file and return full path and file name if they do, otherwise returns blank.
If StartingFolder is ignored, it will use FixPath to return folder of current workbook.
ExtFilters had an example of multiple filters in drop-down.

Function WorkbookOpenAsk_ANmar(Optional StartingFolder = "This", Optional ExtFilters = "All Excel files, *.xls?,All files, *.*")
 ' Asks for a file, then return null if canceled, or full file name and path if selected
 If StartingFolder = "This" Then StartingFolder = FixPath()
 ChDir StartingFolder
 Rett = Application.GetOpenFilename(ExtFilters)
 If Rett = "False" Then Rett = ""
 WorkbookOpenAsk_ANmar = Rett
End Function


Optional StartingFolder, Optional ExtFilters

Views 124 Downloads 66

Perm link