+ Reply to Thread
Results 1 to 5 of 5

Save backup to different directory

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Save backup to different directory

    Good Morning All

    Been wrestling with an issue for past couple of hours with no joy....

    I have a file on the C Drive.... At the beginning of each week the file name is changed with the name in "Sheet 1, Cell A3". Week 1,, Week 2, Week 3, etc.. The macro for changing the name and saving it on the C Drive works as it should.......

    At the end of the week I also need this file to be backed up onto a different drive with its new name, in this case Drive 'H',

    as an example; this week it would be saving Week 1.... then at the end of the week the user presses the button to make a backup of week 1, next week it would be saving Week 2 and making a backup of Week 2 etc

    this is where I am running into problems. it will not save a backup copy.. this is the code I have been trying to use,,,

    many thanks for your help

    Jim

    Please Login or Register  to view this content.
    Last edited by JamesT1; 11-27-2021 at 08:16 AM.

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Save backup to different directory

    Please Login or Register  to view this content.
    Don't think you can have spaces. Code works without them.
    Last edited by nigelog; 11-24-2021 at 08:49 AM.

  3. #3
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Re: Save backup to different directory

    Thanks nigelog

    that didn't work either,,, I have another file in the same folder with a fixed name and that works perfectly saving a backup into the folder H:\Transport\DWR C Backup\

    I was thinking it has to do with the file name changing.... and tried changing the 'sSaveAs' to the specific sheet that the range is in,, but that didn't work either..

    Many thanks

    jim

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Save backup to different directory

    Try
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Re: Save backup to different directory

    nigelog

    Many thanks for your help... I'm going to mark this post as solved,,,, there isn't anything wrong with my original code as it works on a standalone workbook..... so it must be something else that causing this...

    The games afoot....

    cheers

    Jim

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Backup in sub directory
    By Gerrit.B in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-31-2015, 01:09 AM
  2. Macro to Auto save a backup copy in a seperate location OR save file with a pop up
    By kdsanderson30 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-12-2014, 12:38 PM
  3. VBA code to change backup directory using Orlando’s XLtoEXE
    By newqueen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2013, 08:27 PM
  4. [SOLVED] Why is Word, Excel saving a backup copy in my temp directory?
    By daddyribs in forum Excel General
    Replies: 1
    Last Post: 04-19-2006, 11:30 AM
  5. [SOLVED] Backup:always create a backup file in the save options
    By Alek in forum Excel General
    Replies: 1
    Last Post: 01-07-2006, 09:25 PM
  6. Backup files in separate directory?
    By Martyn B Tindall in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-30-2005, 08:10 PM
  7. Replies: 1
    Last Post: 08-02-2005, 05:05 PM

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