Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 914
  • Last Modified:

VBA GetSaveAsFilename

Hi,

I am using the GetSaveAsFilename method to allow a user to select where they wish to save a file. The only problem is that I cannot seem to specify where the default save location should be? Or do I have to use another method?

Any thanks would be great,

Mark
0
mcs26
Asked:
mcs26
  • 3
  • 2
1 Solution
 
apresenceCommented:
Specify the folder you want to save in with a "\" on the end of it:
Application.GetSaveAsFileName("C:\SomeDir\")
0
 
mcs26Author Commented:
isn't the first argument of the GetSaveAsFilename method "intial filename"?
0
 
apresenceCommented:
Yes, it is, but you can specify a folder by putting a "\" at the end of the path.  Just try it, trust me ;).
0
 
apresenceCommented:
If the way I suggested makes you feel uncomfortable, or there's another reason you can't use it, you can also do this:
ChDir("C:\SomeDir")
Application.GetSaveAsFileName
0
 
mcs26Author Commented:
ah I should never have doubted you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now