View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Automaion Addin not loading properly!!


Abhijit,

when excel is opened thru automation addins are not loaded.

note if your addin is an xll or dll you need to call:
application.registerXLL("path for xll")

here are some examples for normal addins (xlas):

assumes XL is excel.application object
For Each ai In XL.AddIns
If lcase(ai.Name) = "myfirst.xla" Then
XL.Workbooks.Open(ai.FullName)Â*.RunAutoMacros 1
End If
Next
For Each ai In XL.AddIns
If lcase(ai.Name) = "mysecond.xla" Then
XL.Workbooks.Open(ai.FullName)Â*.RunAutoMacros 1
End If
Next
'in case you need the other addins...
For Each ai In XL.AddIns
if ai.installed then
if lcase(ai.name) < "myfirst.xla" _
and lcase(ai.name) < "mysecond.xla" then
XL.Workbooks.Open(ai.FullName)Â*.RunAutoMacros 1
End If
end if
Next

HTH
--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Abhijit wrote :

Hi,

We have some excel sheet where data is getting filled up by function
inside an automation addin dll. The excel sheets are launched from
within another .NET application. My problem is that when the excel
sheets are launched the AddIn is not getting loaded properly. So all
the functions are not avaliable.

I have created a simple prototype where I have created a simple excel
sheet and used some of the functions from the same Addin and it works
fine. Only when another application is launching the excel Sheet, the
problem comes it seems.

Can anybody tell what I should do to load the Addins. Strangely the
AddIn check box is checked even though the Addin Functions do not
show up in the function list and the sheets cells do not get correct
values.

Thanks in advance.
Abhijit