View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nel Nel is offline
external usenet poster
 
Posts: 7
Default Determine File Filter Selected

Hi,

I have a dialog box that prompts the user to save the data in excel into a
fixed length text file.

Dim FileName As Variant
FileName = Application.GetSaveAsFilename(InitialFileName:=vbN ullString,
FileFilter:="Format 01 , *.dat, Format 02 , *.dat")

Format 01 will save the text file in "A" defined format.
Format 02 will save the text file in "B" defined format.

Example of "A" defined format: "A1".Value, "A2".Value
Example of "B" defined format: "A2".Value, "A1".Value

The difference in both formats are just the difference in the arrangement of
the data. Both files must be in"dat" format.

I have tried

"Application.GetSaveAsFilename(InitialFileName:=vb NullString,
FileFilter:="Format 01 , *.dat, Format 02 , *.txt")"

where i can identify by the extension, but my client wants the dialog to
display "*.dat" for all formats that is shown instead of "Format 01 (*.dat"),
Format 02 (*.txt)".

I would like to know how can I determine which is the FileFilter is selected
by the users.