+ Reply to Thread
Results 1 to 5 of 5

Save, Move and Kill

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Vancouver BC
    MS-Off Ver
    Excel 2010
    Posts
    49

    Save, Move and Kill

    Catchy title isn't it? Ok, I've surfed this problem to death with no solution. Here's what I'm after:

    After a user edits a particular workbook, I need it to be saved into a different directory. I don't want to save as because this will merely create another file in a different location. Because I am trying to 'idiot proof' this (no, I'm not the idiot) to the greatest possible extent, I want it to work like this:
    OnClick Command Button, the following occurs:
    1) Save Workbook
    2) Move WB to different folder
    3) Kill original WB (so as to not have a second copy of it)

    Any help with some code to make this happen?

    Thanks, Chris

  2. #2
    Registered User
    Join Date
    10-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Save, Move and Kill

    This is entirely possible through VBA. However, the problem with doing this is that the user could still do save or save as to by pass the code set up in the file. It is possible to save the file to a different directory and delete the original file every time the user tries to save/save as the file. Would this be more to your liking or would you want them to click the button that does this instead?

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Vancouver BC
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Save, Move and Kill

    Hi Snax, for the sake of ease, I'd rather just have a command button and be done with it. I think I can get at least that much cooperation from the end users I had considered disabling the 'save, save as' buttons etc. but I think that may be overkill. So yeah, button it is..... Any ideas?

  4. #4
    Registered User
    Join Date
    10-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Save, Move and Kill

    Something like the below should be fine if the directory that you are saving into doesn't change ever. You can also make the file path\file name based off of values from cells in the workbook if you would like. You'll need to enter the file name and file path where the text is in all caps below.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-09-2012
    Location
    Vancouver BC
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Save, Move and Kill

    Thanks Snax, that did the trick!

+ 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