ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   addins dont load when launched by access (https://www.excelbanter.com/excel-programming/401971-addins-dont-load-when-launched-access.html)

Daniel M

addins dont load when launched by access
 
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



Peter T

addins dont load when launched by access
 
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

"Daniel M" wrote in message
...
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






All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com