I have a need to use the GetOpenFileName method, to select a file.
The default directory where the files are stored have different names....
123_ABC.txt
333_ABC.txt
999_WYZ.txt
I can use the FileFilter property to narrow down *.txt files.
But I need to only display the _ABC.txt files. I can get it to work only manually through the dialog...i.e. type in: 'ABC.txt' should filter the list in the dialog to: 123_ABC.txt & 333_ABC.txt
Does anyone know how to programatically match the file name just like the "File name" option in the dialog box itself?
The provided example via this link did not work:
http://mrexcel.com/board/viewtopic.php?topic=6480&forum=2
When we run it, we see the following in the
Files of Type drop-down list:
my Files(*_ABC.txt.*)
We also tried it without the last ".", but it just displayed:
my Files(*_ABC.txt*)
However, no files defined of that type display. Any suggestions would be great.
Perhaps this filter should be applied to the "File Name" entry box instead?
The default directory where the files are stored have different names....
123_ABC.txt
333_ABC.txt
999_WYZ.txt
I can use the FileFilter property to narrow down *.txt files.
But I need to only display the _ABC.txt files. I can get it to work only manually through the dialog...i.e. type in: 'ABC.txt' should filter the list in the dialog to: 123_ABC.txt & 333_ABC.txt
Does anyone know how to programatically match the file name just like the "File name" option in the dialog box itself?
The provided example via this link did not work:
http://mrexcel.com/board/viewtopic.php?topic=6480&forum=2
When we run it, we see the following in the
Files of Type drop-down list:
my Files(*_ABC.txt.*)
We also tried it without the last ".", but it just displayed:
my Files(*_ABC.txt*)
However, no files defined of that type display. Any suggestions would be great.
Perhaps this filter should be applied to the "File Name" entry box instead?