[Webinar] Streamline your web hosting managementRegister Today

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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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