GetOpenFileName only filters on file extensions. You would have to
create your own custom File/Open dialog from scratch with a UserForm and
load it with just the file names you wanted the user to be able to choose
from.
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
"inquirer" wrote in message
...
Is there a way to filter file names using getopenfilename?
I would like to show only those .xls files starting with say "daily", not
all the .xls files.
I have tried
GetOpenFileName("Daily files (daily*.xls), daily*.xls", , , , True)
but this defaults to "All files (*.*)" in the "Files of type" box
If I use
GetOpenFileName("Daily files (*.xls), *.xls", , , , True)
then I get "Daily files (*.xls)" in the "Files of type" box BUT in the
list of
files the fliter hasn't been applied, ie all files in the folder are
listed
for selection.
I am using Excel XP
Could someone help please?
Thanks
Chris