Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 903
  • 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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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