Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Bug in Excel handling VBA/VBScript installation of Add-Ins

When you install and activate an Excel Add-In (.XLA) programmatically the
first time, everything works as expected. However, if the installation is
performed from a local (non-removable) drive, Excel will not copy it in the
'C:\Documents and Settings\<user\Application Data\Microsoft\AddIns' folder
but leave it in the source folder and link to it.

When you try to update the same Add-In [programmatically] and you install it
from a local drive AND from a different folder (such 'C:\AddInv2' instead of
'C:\AddInv1') then Excel continues to link the first one. This also happens
when you install it from a removable drive; here, however, the Add-In is
copied to the '...\M$\AddIns' folder but then the Add-In might be exposed
*twice* in the "Excel|Tools|Add-Ins"

Workaround:
- First programmatically unload the Add-in (Excel as Automation Server
process must be killed otherwise the Registry is not updated,
"ExcelApp.Close" is not enough)
- Remove the Add-In link from the Registry (using WMI since "Wscript.Shell"
cannot do this due to a problem handling "\" characters in registry
keys/values)
- If from a local drive, programmatically copy the Add-In to the
'...\M$\AddIns' folder, otherwise use the "CopyFile := True" option when
adding the Add-In via VBA
- Load the new Add-In programmatically

VBS source provided on request
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Christmas Lights Installation Los Angeles, Beverly Hills, SantaMonica, Culver City, Marina Del Rey, Calabasas, Agoura Hills Thousand OaksHoliday Lights Installation 1-310-925-1720 info Excel Worksheet Functions 0 November 15th 08 02:30 AM
Run VBScript from Excel Amy M Excel Discussion (Misc queries) 4 September 19th 08 09:07 PM
Using excel through vbscript ashtom1 Excel Programming 6 July 6th 05 02:55 PM
Error handling with a handling routine ben Excel Programming 0 March 15th 05 03:01 PM
how to kill excel using a vbscript Harald Staff[_4_] Excel Programming 0 July 17th 03 10:02 PM


All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"