View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Kaisies Kaisies is offline
external usenet poster
 
Posts: 10
Default Excel Add-Ins... Distribution and Overwriting old Versions

I figured thats what it might come to.. I've never seen any VBA code (I'm
just learning from books :( ) to delete files and copy files, also to make
matters worse, everyones user name is different (the Windows XP user name)
and since the .xla is stored in /documents and settings/username/ etc I'd
need to grab the user name somehow....

Guess I'll go digging some more :D

"OfficeHacker" wrote:

Hi Kaisies,

There's several ways you can handle this.

I typically keep the add-in xla on a file server. Whe a user starts Excel it
grabs a copy of the xla (not the original) and loads this into memory. When I
need to update the add-in I need simply to copy the new xla over the old
using windows explorer. I then send an email to each of the users advising
that they need to re-start Excel.

Having the xla on the C: drive makes ongoing updates more difficult (as you
are probably dicovering). To work around this situation you can develop an
Excel workbook which you can email to the users each time the add-in changes.
This workbook should:

1) display a message to the user as soon as it is opened to confirm it can
perform the update (it's always nice to ask),

2) via VBA code, unregister the existing add-in.

3) Delete the old, now unregistered add-in and copy the updated version from
a file server to the appropriate location

4) Register the newly copied xla with Excel

The only thing the user has to do is open the spreadsheet you email to them
and when the message box appears click either Yes or No as to whether they
wish to upgrade the add-in.

Good luck