addins dont load when launched by access

D

Daniel M

I have an addin that is installed. if i select addins it is in the list and
checked. if i open any excel document i have access to the menubar and
macros. if i launch a file from access the addin does not load. is there
something i can do differently? why would i have to specifically load the
addin in code if it is already running in excel? how can i fix this? thanks.

Dim A As Object
Set A = CreateObject("excel.application")
With A.Application
A.Visible = True
A.workbooks.Open "C:\Documents and Settings\Daniel
Motsinger\Desktop\work\File Imports\test1.xls"

A.Run "messagebox"
A.workbooks.Close
End With
 
P

Peter T

If you start Excel with automation installed addins don't load. You can
load most of them like this (not xll's like ATP)

On Error Resume Next
For Each ad In xlApp.AddIns
If ad.Installed Then
Err.Clear
Set wb = xlApp.Workbooks.Open(ad.FullName)
If Err.Number = 0 Then wb.RunAutoMacros 1 'xlAutoOpen
End If
Next

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top