View Single Post
  #2   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Add-in functions when starting Excel programmatically

When you are using Excel in automation, the addins do not get loaded, nor do
any files in XLStart.

To overcome this, you have to do it yourself.

Add and install the addin,

oExcelAddIns.Add("myAddin.xla").Installed = True

you can then reference it as any other workbok

oExcel.Workbooks("myAddin.xla")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steve K." wrote in message
...
Not sure if this question has already been discussed, I couldn't find an

answer in Google newgroups, so your help will be greatly appreciated.

An example: in Excel, under Tools-Add-Ins, select 'Analysis Toolpack'

option. Now if you go under Insert-Function, you'll see new functions from
that add-in, such as MROUND function under function category 'All'.

If you close Excel and launch it programmatically, the add-in seems to be

loaded (checked) but the functions from it (such as MROUND) are missing.
This happens both in 97 and 2000.

To launch Excel I simply created a new VB project with a form and put this

code:

Private Sub Form_Load()
Dim oExcel As Excel.Application
Set oExcel = CreateObject("Excel.Application")
oExcel.Workbooks.Add
oExcel.Visible = True
End Sub

Is this an Excel bug or is there something special that needs to be done

to load the functions from the add-in?

Thanks!



 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.