Trying to use a dialog box to prompt the user to locate the file. By default I would like the file filter to be the expected file type (.xlsx) but I want the user to be able to browse for All Files. Struggling to get the formatting of FileFilter:= correct for multiple groups.
WORKING (with single file Filter)
Application.GetOpenFilename(FileFilter:="Microsoft Excel Files (*.xlsx), *.xlsx", FilterIndex:=1, MultiSelect:=False)
NOT WORKING (multiple file filters)
Application.GetOpenFilename(FileFilter:="Microsoft Excel Files (*.xlsx), *.xlsx" + "All Files (*.*), *.*", FilterIndex:=1, MultiSelect:=False)
Edit: Resolved
SOLUTION
Application.GetOpenFilename(FileFilter:="Microsoft Excel Files (*.xlsx; *.xls), (*.xlsx; *.xls), All Files, *.*", FilterIndex:=1)
Many Thanks,
Chris
WORKING (with single file Filter)
Application.GetOpenFilename(FileFilter:="Microsoft Excel Files (*.xlsx), *.xlsx", FilterIndex:=1, MultiSelect:=False)
NOT WORKING (multiple file filters)
Application.GetOpenFilename(FileFilter:="Microsoft Excel Files (*.xlsx), *.xlsx" + "All Files (*.*), *.*", FilterIndex:=1, MultiSelect:=False)
Edit: Resolved
SOLUTION
Application.GetOpenFilename(FileFilter:="Microsoft Excel Files (*.xlsx; *.xls), (*.xlsx; *.xls), All Files, *.*", FilterIndex:=1)
Many Thanks,
Chris
Last edited: