View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TomCee TomCee is offline
external usenet poster
 
Posts: 32
Default GetOpenFilename in Windows Excel 97 bug?

The getopenfilename function in Excel 97 says that:

Quoting the help system:
fileToOpen = Application.GetOpenFilename("What Files (*.txt), *.txt")
In Windows, this string consists of pairs of file filter strings
followed by the MS-DOS wildcard file filter specification, with each
part and each pair separated by commas. Each separate pair is listed
in the Files of type drop-down list box.

However, I've found that the filter is actually in the first part of
the string. The (*.txt) immediately after the 'What Files' is what is
actually used as the filter and the second *.txt does not seem to do
anything at all! That is, if I change this to:
fileToOpen = Application.GetOpenFilename("What Files (*.*), *.txt")
I get all files listed; - the *.txt seems to do nothing.

Is there something in this function that I'm missing?

Thanks in advance,
Tomcee