Save File to Another Directory, but not change Users File Save location

M

Mike Knight

From Excel toolbar, A user's current "File Save As" location is
\\Server1\UsersName\Documents.

After my code saves the open workbook (ActiveWorkbook.SaveAs Filename)
to \\Server2\MyName\Documents, the next time the user does "File Save
As" from an Excel toolbar, the location seen is
\\Server2\Myname\Documents.

How can I store the users's current "File Save As" path, run code, and
restore the user's current "File Save As" path?

In other words, the next time the users selects "File Save As", no
directory path changes will be noticed.

Thanks,
Mike
 
J

jaf

Hi Mike,
This happens without closing Excel? That the was SaveAs works. Your renaming
the running file.
A simple work around is to use the SaveCopyAs method instead.

ActiveWorkbook.SaveCopyAs " \\Server2\MyName\Documents"


--
John
johnf 202 at hotmail dot com


| From Excel toolbar, A user's current "File Save As" location is
| \\Server1\UsersName\Documents.
|
| After my code saves the open workbook (ActiveWorkbook.SaveAs Filename)
| to \\Server2\MyName\Documents, the next time the user does "File Save
| As" from an Excel toolbar, the location seen is
| \\Server2\Myname\Documents.
|
| How can I store the users's current "File Save As" path, run code, and
| restore the user's current "File Save As" path?
|
| In other words, the next time the users selects "File Save As", no
| directory path changes will be noticed.
|
| Thanks,
| Mike
 

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

Top