M
Martin Brown
I have encountered an odd quirk in GetOpenFilename in Excel 2003
It works fine provided that you never have to use the filter for files
with no file extension. If you attempt to filter on "*." the entry is
completely ignored!
(No error message or syntax error parsing it just vanishes from the
listbox)
Filename = Application.GetOpenFilename("All files
(*.*),*.*,Bug(*.),*.,Other (*.csv),*.csv", manuf, "Open CSV file")
Displays a listbox with just two entries "All files, Other". The parser
appears to have ignored the Bug entry completely.
Filename = Application.GetOpenFilename("All files
(*.*),*.*,Bug(*.?),*.?,Other (*.csv),*.csv", manuf, "Open CSV file")
Displays a listbox with 3 entries as expected, but alas "*.?" does not
match our hard to find "*." filenames.
Filename = Application.GetOpenFilename("All files (*.*),*.*,Bug(*.
),*. ,Other (*.csv),*.csv", manuf, "Open CSV file")
Displays a listbox with 3 entries as expected. Unfortunately ". " does
not match a file with no extension either.
Anyone see a way to make GetOpenFilename filter for ("*.") ?
I tried the knowledgebase but it didn't seem to have anything on this.
Thanks for any enlightenment or workarounds. "*.*" sees the relevant
files, but is not especially convenient as it sees everything else as
well.
Regards,
It works fine provided that you never have to use the filter for files
with no file extension. If you attempt to filter on "*." the entry is
completely ignored!
(No error message or syntax error parsing it just vanishes from the
listbox)
Filename = Application.GetOpenFilename("All files
(*.*),*.*,Bug(*.),*.,Other (*.csv),*.csv", manuf, "Open CSV file")
Displays a listbox with just two entries "All files, Other". The parser
appears to have ignored the Bug entry completely.
Filename = Application.GetOpenFilename("All files
(*.*),*.*,Bug(*.?),*.?,Other (*.csv),*.csv", manuf, "Open CSV file")
Displays a listbox with 3 entries as expected, but alas "*.?" does not
match our hard to find "*." filenames.
Filename = Application.GetOpenFilename("All files (*.*),*.*,Bug(*.
),*. ,Other (*.csv),*.csv", manuf, "Open CSV file")
Displays a listbox with 3 entries as expected. Unfortunately ". " does
not match a file with no extension either.
Anyone see a way to make GetOpenFilename filter for ("*.") ?
I tried the knowledgebase but it didn't seem to have anything on this.
Thanks for any enlightenment or workarounds. "*.*" sees the relevant
files, but is not especially convenient as it sees everything else as
well.
Regards,