ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Determine File Filter Selected (https://www.excelbanter.com/excel-programming/417053-determine-file-filter-selected.html)

Nel

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.



Nel

Determine File Filter Selected
 
Forgot to mentioned that I am working on Excel 2000.


All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com