There may be times when you need to ask the user to select a location to save a file. This can be done using a save file dialog. Keep in mind. Morning All, I have a macro that modifies a standard template. At the end of this macro I want a save as dialogue that opens up in a default. Trying to set filename to cell A1 Value, but this does not work. what am I doing wrong please. TY Sub Move_Copy_Save() Dim varResult As.
|Published (Last):||6 March 2008|
|PDF File Size:||15.25 Mb|
|ePub File Size:||5.74 Mb|
|Price:||Free* [*Free Regsitration Required]|
This one displays the standard Save dialog box. Just like with GetOpenFilename, you can test whether the result equals False getsaveasfileanme determine if the user clicked the Cancel button. For Each rRow In Sheet1.
Dear Dick, Thank you very much for your sample: It started to work immediately, without any changes. Thank you again and all the best. This geysaveasfilename very good functionality. I would like to be able to use it in Access. I have a module and have added the Excel 9. I can see it in the library with Getsaveasfi,ename press F2 and search for it, but when I enter it into code, no intellisence and I get and I get a compiler error — syntax error.
Can it be used in an Access module? I must have gotten the information I needed from Google, but if anyone wants, I could try to remember which project it was, and hunt down the code. It opens up the save as Dialogue and I can pick a file name and destination and that is copied to DestFile just like I want.
When I try to use this:.
eAsFilename – Free Excel\VBA Help Forum
Other getsavwasfilename I get getsaveawfilename more generic syntax error. The macro cannot be run. Any ideas why this is happening to me? Any help would be appreciated!
Take out the offending underscore character, or put thee cursor right after it and press Enter. Leave it to Microsoft…. I ended up having to write my own routine to write a proper tab-delimited file that Access can import without problems. I need to do this because the pivot is querying information within the workbook using SQL.
Anyone got any good suggestion as to how I could allow users to change the filetype based on what they select with the GetSaveAsFilename dialogue? If I just stick with current code, can it be written any smarter? Interesting…I amended this code so that instead of the filename being blank, it returns the ActiveWorkbook. However, it turns out that if the filterindex setting does not exactly match the filetype as the workbook currently has, then the ActiveWorkbook.
But if your file is currently in. If the filename does not contain any dots i. Your email address will not be published. Notify me of followup comments via e-mail.
Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb
You can also subscribe without commenting. Leave this field empty.
Easy to get working and modify getsaveastilename suit my individual needs. Search Google for the following: When I try to use this: Leave it to Microsoft… I ended up having to write my own routine to write a proper tab-delimited file that Access can import without problems. Thanks for the help so far!
And on Windows, it does not work the way the help claims. Getsaveqsfilename following works on Windows, but it took me at least an hour of googling and experimenting: If you want both, try one of these: Thanks for any suggestions.
For instance, if your code sets out the following: Leave a Reply Cancel reply Your email address will not be published.