Solved

VBA GetSaveAsFilename

Posted on 2010-08-31
5
886 Views
Last Modified: 2012-05-10
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
Comment
Question by:mcs26
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:apresence
ID: 33565428
Specify the folder you want to save in with a "\" on the end of it:
Application.GetSaveAsFileName("C:\SomeDir\")
0
 

Author Comment

by:mcs26
ID: 33565452
isn't the first argument of the GetSaveAsFilename method "intial filename"?
0
 
LVL 6

Accepted Solution

by:
apresence earned 500 total points
ID: 33565466
Yes, it is, but you can specify a folder by putting a "\" at the end of the path.  Just try it, trust me ;).
0
 
LVL 6

Expert Comment

by:apresence
ID: 33565479
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
 

Author Comment

by:mcs26
ID: 33565482
ah I should never have doubted you!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now