sFilters = "Excel Files (*.xlsx), *.xlsx"
iFilterIndex = 1
sTitle = "Select Excel File"
ChDir ThisWorkbook.Path & "\"
sFileName = Application.GetOpenFilename(FileFilter:=sFilters, _
FilterIndex:=iFilterIndex, Title:=sTitle)
The above code works, but I can't figure out how to get both *.xlsx files and/or *.xls files.
I've tried: sFilters = "Excel Files (*.xls;*xlsx), *.xls;*.xlsx"
But I get all files and not just Excel files.
I've tried: sFilters = "Excel Files (*.xlsx), *.xlsx" & "Excel Files (*.xls), *.xls"
But I get an error with that method.
Any idea how I can get both *.xls & *.xlsx files?
Any help will be greatly appreciated!
Steven Craig Miller
Bookmarks