Excel Addin and Windows Profile

J

Jos Vens

Hi,

I wrote a program in Excel VBA and until last year, the location was
C:\Program Files\Libra\Libra.xla

This year, I wanted to change that path, because some users had no access to
install there, so I changed it in C:\Libra\Program\Libra.xla. So far so
good, but now and then, without no reason, Excel tries to open Libra.xla in
the old location (PF), and since I have removed it there, you first get an
error message, then you have to go in the Addins, remove from list and
restart Excel, and load the new version.

This is very annoying. I know, the reason is there is a local profile and a
network profile of the user. Excel puts an addin somewhere in the profile.
I have deleted the local profiles but still, I can't get rid of the problem
for sure (sometimes, the old one gets back - I guess when the network is
heavy used -> local profile).

I understand this is more a windows question than an excel one, but maybe,
you have solved the same problem and knows a solution?

Thanks
Jos Vens
 
K

keepITcool

By default Excel scans 2 folders for the addins :

application.librarypath
application.userlibrarypath

any files found there are listed in the addins list.
if a file is found in BOTH the user and the "system" library
the file in the USER library takes precedence


Also you can write some strings into the registry
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Add-in Manager
those files will also be listed. (not opened)


Then it comes to OPENING the files Excel will look at
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options

and attempt to open all files where the entry name is
OPEN1, OPEN2 etc

When excel closes is clears and rewrites the entries for all activated
addins to that last key.

When excel starts and it cannot find a file listed under one of the
"OPEN" entries.. then you get the Alert, which you cannot disable.

You cannot DEactivate/remove items from the dialog list with code
(unless you use SENDKEYS, which makes it language dependent), AND it's
no use writing to the registry from within excel, because the moment
you exit, excel writes its own list again...

I've resorted to writing some code in VB to manipulate the registry,
and have the user run the compiled exe, but you could do it in VBscript.


That's the theory on addin loading...

hth...





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Jos Vens wrote :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top