Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |