View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Charles Williams Charles Williams is offline
external usenet poster
 
Posts: 968
Default 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