you can use like this. string fileFilter = “Excel Workbook (*.xlsx),*.xlsx,” + “Excel Macro-Enabled Workbook (*.xlsm),*.xlsm,” + //”Excel Binary. Try this. Code: Sub Xxxxx_SaveAs() Dim fname fname = Application. GetSaveAsFilename(InitialFileName:=””, FileFilter:=”Excel Files (*.XLS), *. GetSaveAsFilename([InitialFilename], [FileFilter], [FilterIndex], [Title], [ButtonText]) Synopsis Displays the Save File As dialog box and returns a filename or False.
|Published (Last):||1 January 2015|
|PDF File Size:||10.21 Mb|
|ePub File Size:||16.93 Mb|
|Price:||Free* [*Free Regsitration Required]|
If you try to save an excel file using that path you will end up with an unrecognized file type:. Please tell me, is there any other way to achieve this from code behind.
Use code tags around code. Gegsaveasfilename separate pair is listed in the Files of type drop-down list box. Let’s work to help developers, not make them feel stupid. Does this sound about right?
Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb
XLSM if you want to save in an Excel file format. Highlight your code and click the icon at the top of your post window.
When answering a question please: Specifies the title of the dialog box.
If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. There are no open issues.
Don’t tell someone to read the manual. How to add filter in datagidview. To use multiple MS-DOS wildcard expressions for a single file filter type, separate the wildcard expressions with semicolons; for example, “Visual Basic Files.
Results 1 to 7 of 7. Share it with filefiltr Like this thread? Thanks for the help.
Great Post, thanks for sharing. If this argument is omitted or greater than the number of filters present, filrfilter first file filter is used.
[Solved] Add filters in GetSaveAsFileName – CodeProject
Further, is there getsaveasfilena,e way to default the Save as t ype to. Add your solution here. Treat my content as plain text, not as HTML. You may have to register before you can post: The path selected will be printed in cell A2. A path with no file extension.
This would be very annoying on the users side. Understand that English isn’t everyone’s first language so be lenient of fildfilter spelling and grammar.
All times are GMT If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. To start viewing messages, select the forum that you want to visit from the selection below. Provide an answer or move on to the next question.
Articles Quick Answers Messages Use my saved content filters. Aren’t you doing asp. Last edited by AlanSidman ; November 2nd, ,