change default file path in Save As dialog box

  • Thread starter Thread starter charles
  • Start date Start date
C

charles

Hi,

Need expert advice here: How can I change the default file path
appearing in the Save-As dialog box using VBA? I have a workbook
application stored at, say, C:\MyProgram, I want the user save their
file automatically at a different location, say, c:\my document,when
they click Save or Save As

Thanks much in advance.
 
Hi
use the statement
chdir "c:\my document"

before invoking the dialog
 
Frank,
Thanks, but I found it not working...when I click File, Save As, the
default path is still the one where the workbook is opened. I want to
define a different one.
Regards,
Charles
 
From a reply to a very similar question:

Since xl2k (IIRC), if you open a file, excel will show you that file's folder
when you do a file|saveAs.

And since you're going to that OLK5 location, I'm betting you're reading an
attachment in your email--that's where your email stores the file when you click
on it to read it.

I don't know of a way to change this behavior.

(But I'm usually glad it works this way. If I open one of my own files and do a
File|SaveAs, I usually want to save it in the same folder.)

And I do agree that it's a pain with attachments to emails.

But hope isn't lost

Since you're using xl2003, you can do this:

Next time you're in the File|open (or File|SaveAs) dialog, traverse to your
favorite folder (but just select it--don't go into it)

Then click Tools|Add to My Favorites.

Now, you can just click on that shortcut in the "look in" toolbar (left hand
side of the File|open/SaveAs dialog).

====
If you're using xl2k: You could use an addin from MS:

It's called Places.exe that allows you to update the places list.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q253338
INFO: Office Developer Samples and Tools Available for Download (Q253338)

Scroll about halfway down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top