Hi, thanks for you help.
I think I'm only confusing you by trying explain what I need in greater
detail. And I'm still confused myself.
Basically, my c# add-in does not know that the VBA add-in exists.
So to make matters simple, i need this:
****** The VBA addin checks whether the c# add-in is loaded - and loads
it programmatically, if necessary.
What's the VBA for doing that?
Thanks again,
Aaron Fude
Charles Williams wrote:
The key is to only have Excel itself load one addin (either an xla or
COM
addin or Automation Addin or whatever), then that addin loads the
other
ones.
An XLA addin is basically a hidden Excel workbook. You can open it
like any
other workbook using Workbooks.Open without using the Excel.Addins
collection or going anywhere near the registry etc.
an automation addin is a different animal (its basically a DLL rather
than a
workbook) supported only from Excel 2002 onwards, and needs to be
installed
using regserver and Addins.Add.
so if the automation addin needs to be loaded first the simplest
solution is
my first suggestion: do not have the XLA addin installed using Tools
Addins
(ie no registry OPEN etc entries) just add some code to the
automation addin
which opens the XLA addin when it needs to.
Or you could write a simple loader that installed the automation
addin
(shell to regserver if needed then addins.add) and then opened the
XLA, or
vice-versa.
If you want a more comprehensive example of an addin loader look at
the
Automatically reversioning addin loader on my downloads page (but it
only
handles XLA addins)
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com
wrote in message
oups.com...
OK,
The VBA add-in "depends" on the automation c# add-in. So the
automation
add-in needs to be loaded first. Wha I was suggesting in the previous
email is that *if* the VBA add-in insists on being loaded first,
perhaps it could have some code that checks whether the automation
add-in is loaded and, if not, load it.
Also,
1. What Michel is suggesting simply does not work for me. Excel
simply
rewrites the OPEN keys in the mentioned location.
2. I like the idea of a "simple loader" and I have several questions
about it.
A. Would you recommend that it is written in VBA?
B. How would I make sure that *it* is loaded first?
C. What's the command for loading an automation add-in?
D. What's the command for loading a VBA add-in?
Michel Pierron wrote:
Hi,
Change order of the OPEN keys in
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\E xcel\Options
10.0 is version of excel2002
Regards,
MP
a écrit dans le message de
ups.com...
Hi,
We have an automation add-in and a VBA add-in that depends on the
automation add-in and we just can't get the automation add-in to
load
before the VBA add-in!!!
We've tried just about anyithing. Unloading them and loading them
back
in (every time restarting Excel). Going to the registry, deleting
the
OPEN* variables and then uploading the add-ins in the same
correct
order again. Nothing works: they just switch back!!!
Is there a way to fix this problem? We are very desperate so any
help
is appreciated!
Many thanks in advance!!!
Aaron Fude