+ Reply to Thread
Results 1 to 2 of 2

Excel overwrite itself.

  1. #1
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Excel overwrite itself.

    Can this be achieved...

    I am trying to fully mimic an app but using Excel.
    When you run a program it sometimes tells you a newer version is available for download.
    I have replicated this inside an Excel file.

    In the file open section, a macro looks on my website and compares its current version with a version text from my site.
    If the versions match nothing happens, if the website has a newer version a message appears letting the user know.
    When the message appears, another macro silently dumps the files user data & database info into a safe backup file.
    Then....
    You download the newer Excel file and overwrite the old Excel file.
    When you open the new Excel file, it knows its new so silently opens the safe file and imports its data back.
    All done, the file can then work as before but with a load of new features / bug fixes etc.

    My question is this:

    When a newer version is detected, the downloading and overwriting process has to be done manually.

    Is there a way to make this work seamlessly?
    Can vba within an Excel file, download a file with the same filename, close the Excel file then overwrite itself?

    Any help even if its to say not possible would be a help.

    Thanks
    Last edited by sparx; 02-01-2017 at 04:22 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Excel overwrite itself.

    No. If the file closes, Excel closes, and no more code will run. This would have to be done using an external application.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Excel VBA Notepad - overwrite possible?
    By RiskyP in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2013, 04:43 PM
  2. Excel overwrite
    By andrei10bc in forum Excel General
    Replies: 2
    Last Post: 11-13-2012, 05:20 AM
  3. [SOLVED] Macro with "save as" --- Need excel to overwrite a file without a prompt to overwrite
    By tsmith1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 10:54 AM
  4. Overwrite existing excel sheets
    By med1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-18-2011, 03:36 PM
  5. Prevent data cell overwrite but allow blank cell overwrite
    By Squasher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2011, 09:24 AM
  6. [SOLVED] Saving an Excel file & overwrite (C++)
    By Zorb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2006, 10:15 AM
  7. retrieving of overwrite excel file?
    By PLS! need help. in forum Excel General
    Replies: 1
    Last Post: 10-10-2005, 06:05 AM
  8. Excel Server Object won't overwrite
    By Olivia Towery in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2005, 04:06 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