Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Save File to Another Directory, but not change Users File Save location

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Save File to Another Directory, but not change Users File Save location

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


"Mike Knight" wrote in message
om...
| 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How change the file location that I save my files to? John Scinto[_2_] Excel Discussion (Misc queries) 1 December 26th 07 01:14 AM
file save error: the file or directory cannot be created dublg Excel Discussion (Misc queries) 1 September 25th 06 07:07 PM
Automatically save a file in another directory MarkT Excel Discussion (Misc queries) 4 September 18th 06 02:53 PM
Save file, refer filename to cell and change directory Metin[_3_] Excel Programming 3 April 23rd 04 02:13 AM
get path - save new file - same sub-directory as existing file tegger Excel Programming 2 October 21st 03 10:45 AM


All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"