+ Reply to Thread
Results 1 to 3 of 3

VBA Check for new workbook and replace current open book

  1. #1
    Registered User
    Join Date
    07-04-2013
    Location
    Liverpool
    MS-Off Ver
    Excel 2007
    Posts
    21

    VBA Check for new workbook and replace current open book

    Hi All

    I am just playing around with a few ideas and have a workbook that I may want to distribute updates for.
    I want the workbook to check to see if a new version exists in a different location on the network and close the open workbook copy the new version over it and then open the new version.


    Logically this probably isnt possible however I though I would ask and see if it was or if there is a way around this.

    The update would include new vba code and possibly forms and contents

    thanks in advance

    Dave

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: VBA Check for new workbook and replace current open book

    I would think you could do it with something along the lines of:
    1. in the workbook open event of the "old version" put the check for a new version
    2. if new version is found, open the new version
    3. from the old workbook, call a macro you have put in the new workbook and pass the old workbook name/path
    4. in the macro in the new workbook, close the old workbook, then save the new workbook over it

    the two macros would be something like:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-04-2013
    Location
    Liverpool
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: VBA Check for new workbook and replace current open book

    Thanks Yudlugar

    I see where you were going with this, its a perfect soloution.

    Thank you

    The only thing I am missing is checking a version, I suppose I could have this on a hidden sheet in a cell.

    Thanks again

    Dave

+ 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. Open workbook, copy rows, paste to end of current workbook
    By gmn734 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2013, 05:16 AM
  2. current work book open
    By bigman8424 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2012, 01:05 AM
  3. How to open,save and close another workbook from the current workbook using macro?
    By ravikumar00008 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-15-2012, 10:42 AM
  4. Open book, check for macros, close book
    By CLR in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-31-2005, 02:06 PM
  5. [SOLVED] The first workbook I open in excel causes book 1 to also be opene.
    By manders in forum Excel General
    Replies: 3
    Last Post: 01-21-2005, 02:06 PM

Tags for this Thread

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