+ Reply to Thread
Results 1 to 6 of 6

Using SaveAs & changing the path a file is saved at

  1. #1
    Registered User
    Join Date
    03-26-2007
    Posts
    92

    Using SaveAs & changing the path a file is saved at

    Hello -

    I have a spreadsheet with a button that saves a worksheet directly to the users C drive. Below is the code that is assigned to the button:

    Please Login or Register  to view this content.
    Range("I3") is a cell that has a string of text with the file path and description of how to save it:

    Please Login or Register  to view this content.
    E3 is a cell that has another concatenate that results in a name like _2008312_1048. _2008312 is 03/12/2008; _1048 is the time the file was saved.

    I have been asked to change this so it saves to a 'Test Folder' in a user's 'My Documents' folder. Being on a network, the path changes; it's listed as C:\Documents and Settings\[random user name]\My Documents\Test Folder.

    Is there a way for me to acheive this?

    Thank you!

  2. #2
    Registered User
    Join Date
    03-26-2007
    Posts
    92
    If this is not possible, is there a way for me to have the user specify which folder it saves to, but keep the naming format (_20080312_1048) the same?

  3. #3
    Registered User
    Join Date
    03-26-2007
    Posts
    92
    I should also mention that I'm using Excel 2003.

  4. #4
    Registered User
    Join Date
    03-26-2007
    Posts
    92
    I've attempted to use the VBA on this page: http://www.excelforum.com/showthread...ghlight=saveas

    However, I'd like this to happen on the click of a command button and only when that button is clicked, not when the user goes to File > Save, or hits the save button.

    Any suggestions for adaptation?

  5. #5
    Registered User
    Join Date
    03-26-2007
    Posts
    92
    Bumping post.

    Any help would be appreciated!

  6. #6
    Registered User
    Join Date
    03-26-2007
    Posts
    92
    After some more trial and error, I modified the code from http://www.excelforum.com/showthread...ghlight=saveas to work for my command button.

    I used the below code:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1