ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Addin and Windows Profile (https://www.excelbanter.com/excel-programming/322345-excel-addin-windows-profile.html)

Jos Vens[_2_]

Excel Addin and Windows Profile
 
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



keepITcool

Excel Addin and Windows Profile
 


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\E xcel\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\E xcel\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 :

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



All times are GMT +1. The time now is 09:15 AM.

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