ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Updating hiden workbook (https://www.excelbanter.com/excel-programming/320647-updating-hiden-workbook.html)

AdmSteck

Updating hiden workbook
 
I have a workbook that is in the XLStart folder and loads every time excel
opens. I want to compare the version of this file on the local machine to a
copy kept on a server and replace it with the server version if it is newer.
I have the code to compare the two versions to work correctly, the problem
is updating. All macro execution stops as soon as I close the local copy to
overwrite it. I have tried putting the update code in a 3rd workbook, but
this doesn't want to work either. If I put the code in the Auto_open() or
Workbook_Open() it does not get called when I open the workbook from code.
Also, if I open the workbook and

Robin Hammond[_2_]

Updating hiden workbook
 
1. put a 3rd workbook (or better an xla) in the xlstart folder. I'll Call
this loader. put the file you want to load somewhere else so that it doesn't
auto load.
2. in the Loader, have an auto_open macro that checks the version of the
file you want to load (I'll call this X).
3. if X is not up to date, open X v2 from the network and save it over X
or If X is up to date, Open X
4. If you need to, run any start up macros in X by calling them from Loader.
5. Close Loader.

Robin Hammond
www.enhanceddatasystems.com

"AdmSteck" wrote in message
...
I have a workbook that is in the XLStart folder and loads every time excel
opens. I want to compare the version of this file on the local machine to
a
copy kept on a server and replace it with the server version if it is
newer.
I have the code to compare the two versions to work correctly, the problem
is updating. All macro execution stops as soon as I close the local copy
to
overwrite it. I have tried putting the update code in a 3rd workbook, but
this doesn't want to work either. If I put the code in the Auto_open() or
Workbook_Open() it does not get called when I open the workbook from code.
Also, if I open the workbook and





All times are GMT +1. The time now is 08:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com