Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
Why dont you get the automation add-in to open the XLA itself rather than
trying ti get Excel to do it for you? Charles ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com wrote in message 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
Charles Williams wrote: Why dont you get the automation add-in to open the XLA itself rather than trying ti get Excel to do it for you? Charles Actually, the automation add-in is the more stand alone thing of the two. It provides some basic functionality that is useful in the absence of the VBA addin and the VBA add-in uses it. Would would work if the VBA could somehow make sure that the automation add-in is loaded. But how to do that?! Thanks! Aaron Fude ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com wrote in message 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
Your first post said that you want to load the automation addin before the
VBA addin, and your second post said you want to load the VBA addin before the automation addin, so I am confused. However the answer is still basically the same: if you want to control what is loaded and in what sequence then write some code to do it instead of trying to get Excel to do it for you: you could create a simple loader XLA that is installed as an excel add-in so that when excel starts /closes the loader XLA opens the real XLA and installs/uninstalls the automation addin and runs an initialisation routine, in whatever sequence you want to do things. regards Charles ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com wrote in message oups.com... Charles Williams wrote: Why dont you get the automation add-in to open the XLA itself rather than trying ti get Excel to do it for you? Charles Actually, the automation add-in is the more stand alone thing of the two. It provides some basic functionality that is useful in the absence of the VBA addin and the VBA add-in uses it. Would would work if the VBA could somehow make sure that the automation add-in is loaded. But how to do that?! Thanks! Aaron Fude ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com wrote in message 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
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 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
Assuming you really do have an Automation addin rather than some other kind
of addin: Basically, my c# add-in does not know that the VBA add-in exists. Of course not, but its so easy: all it has to do is open it as if it was a workbook ... ****** The VBA addin checks whether the c# add-in is loaded - and loads it programmatically, if necessary. something like this (not tested), where Myprojectname.classname is the ProgId of your Automation addin dim oAddin as addin on error resume next set oaddin=nothing set oaddin=addins("MyProjectname.classname") on error goto 0 if oaddin is nothing then addins.add("MyProjectname.classname") set oaddin=addins("MyProjectname.classname") endif if not oaddin.installed then oaddin.installed=true Charles ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
Charles Williams wrote: Assuming you really do have an Automation addin rather than some other kind of addin: Basically, my c# add-in does not know that the VBA add-in exists. Of course not, but its so easy: all it has to do is open it as if it was a workbook ... ****** The VBA addin checks whether the c# add-in is loaded - and loads it programmatically, if necessary. something like this (not tested), where Myprojectname.classname is the ProgId of your Automation addin dim oAddin as addin on error resume next set oaddin=nothing set oaddin=addins("MyProjectname.classname") on error goto 0 if oaddin is nothing then addins.add("MyProjectname.classname") set oaddin=addins("MyProjectname.classname") endif if not oaddin.installed then oaddin.installed=true Thank you, Charles!!! This code works! Could you explain some of the terminology? Assume that my automation add-in is registered. Am I correct that in order for (set oaddin=addins("MyProjectname.classname")) to work it must already be in the list of Add-ins but not necessarily "clicked in"? And that "oaddin.installed=true" is equivalent to "clicking it in"? And as a final question. If my automation add-in is clicked to be loaded when Excel starts, but my VBA add-in with your wonderful code beats Excel to the punch, will Excel try to load it afterwards anyway and if so will it cause an error? Once again, thank you so much. Aaron Fude Charles ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Order of Excel Add-ins.
The code looks to see if the addin is in the list, and if it is not in the
list it adds it. Then if it is not installed from the list it installs it. So the code should work regardless of the state of the automation addin (assuming it is registered). -- Charles ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com wrote in message oups.com... Charles Williams wrote: Assuming you really do have an Automation addin rather than some other kind of addin: Basically, my c# add-in does not know that the VBA add-in exists. Of course not, but its so easy: all it has to do is open it as if it was a workbook ... ****** The VBA addin checks whether the c# add-in is loaded - and loads it programmatically, if necessary. something like this (not tested), where Myprojectname.classname is the ProgId of your Automation addin dim oAddin as addin on error resume next set oaddin=nothing set oaddin=addins("MyProjectname.classname") on error goto 0 if oaddin is nothing then addins.add("MyProjectname.classname") set oaddin=addins("MyProjectname.classname") endif if not oaddin.installed then oaddin.installed=true Thank you, Charles!!! This code works! Could you explain some of the terminology? Assume that my automation add-in is registered. Am I correct that in order for (set oaddin=addins("MyProjectname.classname")) to work it must already be in the list of Add-ins but not necessarily "clicked in"? And that "oaddin.installed=true" is equivalent to "clicking it in"? And as a final question. If my automation add-in is clicked to be loaded when Excel starts, but my VBA add-in with your wonderful code beats Excel to the punch, will Excel try to load it afterwards anyway and if so will it cause an error? Once again, thank you so much. Aaron Fude Charles ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to change series plotting order without changing legend order? | Charts and Charting in Excel | |||
For chart syles, why doesn't color order match series order? | Charts and Charting in Excel | |||
How stop Excel file UK date order changing to US order in m.merge | Excel Discussion (Misc queries) | |||
purchase order counter in excel purchase order template | Excel Worksheet Functions | |||
Daily Macro to Download Data, Order and paste in order | Excel Programming |