Can't set correct filter for SaveAs dialog

Yobanlong

New Member
Joined
Sep 18, 2008
Messages
39
Hi

I am using Excel as a GUI to produce a text file that will be read by another program. Basically, the user will put in data in a spreadsheet, and save these data as a text file (I want to use file ending *.wan). I need to have a SaveAs dialog so that the user can select a folder and a filename for the file.

I have tried to use Application.FileDialog(msoFileDialogSaveAs) but I am not able to set the correct filters, I only get the standard Excel fily types.

Does anybody know how I can set the correct filters, or another method I can use to get a SaveAs dialog with a ".wan" filter?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Sorry folks! I figured it out! This one works fine, I post it in case anybody else needs it.

Code:
FileSavename = Application.GetSaveAsFilename( _
                      InitialFileName:="", _
                      FileFilter:="Water analysis (*.wan),*.wan")
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top