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.
Author: | Akinole Kesar |
Country: | Timor Leste |
Language: | English (Spanish) |
Genre: | Art |
Published (Last): | 7 November 2007 |
Pages: | 180 |
PDF File Size: | 9.78 Mb |
ePub File Size: | 20.7 Mb |
ISBN: | 698-5-73819-872-1 |
Downloads: | 6770 |
Price: | Free* [*Free Regsitration Required] |
Uploader: | Sajinn |
There are several different methods for creating a save file dialog.
Add filters in GetSaveAsFileName
This method returns the selected file name or the name entered by the user. Read the question carefully. Highlight your code and click the icon at the top of your post window. Close ; I have used this code.
Top Rated Most Recent. The method explained there has some pros and cons:. You may have to register before you can post: Resources saved on this page: Your email address will not be published. How can I achieve this. Results 1 to 6 of 6.
Last edited by k13r4n; at The example below creates 2 filters a. Do you need your password? If this argument is omitted, the default title is used. Sign in to give feedback. The actions all complete as expected, except for actually saving it. If you try to save an excel file using that path you will end up with an unrecognized file type:.
The path selected will be printed in filefiltre A2. Can you please elaborate on what exactly you want to achieve??? Return value Variant Remarks This string passed in the FileFilter argument 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.
Chances are they have and don’t get it.
This email is in use. I’ve populated the “” with the desired filename prefix and this now works great. Please take a few minutes to read all Forum Rules and comply in the future. I was wondering, is there any way to specify a default File name in the save dialog box?
eAsFilename method (Excel) | Microsoft Docs
Thanks for the help. Specifies the index number of the default file filtering criteria, from 1 to the number of filters specified in FileFilter. Does this sound about right? You may also leave feedback directly on GitHub. Results 1 to 7 of 7. If this is your first visit, be sure to check out the Board FAQ by clicking the link above.
I have added them for you today. Existing Members Sign in to your account. Please Sign up or sign in to vote.
Solved: eAsFilename question
Try like this Code:. My procedure is not likely to be optimal, but it works.
Steve “Nearly all men can stand adversity, but if you want to test a man’s character, give him power. Last edited by Artik; at This method also has some pros and cons:. Let’s work to help developers, not make them feel stupid. Forums Blogs Articles Groups. So im asuming that i need to have some code that runs after the user clicks save, that checks if the file already exists, and then, if it does, brings up a msgbox to ask if they want to overright.
I’ve been thinking, to use ActiveWorkbook. Leave a Reply Cancel reply Your email address will not be published. The returned name may include a path specification. Nobody knows the trouble I’ve not seen!