Open Excel with Add-ins in Access

S

salut

I am trying to open Excel through Access. The problem is it will not
automatically load all those Add-Ins. Is there anyway to solve the problem?
Thanks!

The code I used to open excel is the following:

"Set oExcel = CreateObject("Excel.Application")"
 
D

David Lloyd

The Excel Application object has an AddIns collections which you can use to
load the AddIns (the Add method). The collection also has an Installed
property which you can use to install an add-in in the AddIns collection.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I am trying to open Excel through Access. The problem is it will not
automatically load all those Add-Ins. Is there anyway to solve the problem?
Thanks!

The code I used to open excel is the following:

"Set oExcel = CreateObject("Excel.Application")"
 
D

David Lloyd

Dim xl As New Excel.Application
Dim wkb As Excel.Workbook

Set wkb = xl.Workbooks.Add()

'This loads the add-in into Excel
wkb.Application.AddIns.Add ("C:\MyAddIn.xla")

'This is the equivalent of checking the checkbox
wkb.Application.AddIns("MyAddIn").Installed = True

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


can you provide example for it?

thanks
 

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