Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default getopenfilename

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default getopenfilename


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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetOpenFilename Hasan Cansü Excel Programming 0 September 24th 03 01:32 PM
How to use .GetOpenFilename in For loop? Milind Excel Programming 2 August 6th 03 09:43 PM
Using GetOpenFilename Robin Seaby Excel Programming 2 August 6th 03 04:50 PM
GetOpenFilename and arrays Shunt Excel Programming 1 July 31st 03 04:26 PM
GetOpenFilename Daniel[_4_] Excel Programming 3 July 27th 03 11:00 AM


All times are GMT +1. The time now is 10:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"