LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Automation and Add-Ins

When opening Excel with the following code snippet (located in an Access module) and dropping the XIRR function (an Excel add-in in the Analysis Tool pak) into a cell; the cell shows "#NAME?". The current version of Excel does not recognize this add-in function. But, if I open Excel and then run the code the function works! Do I need to explicitly reference Excel's ad-in when opening Excel in automation? Thanks for thoughts or solutions.

Forrest

'Open or create an instance of Excel and add a workbook
On Error Resume Next
Set xlApp = GetObject(, "Excel.Application") 'Activate current Excel object
If Err.Number < 0 Then
Err.Clear ' Clear Err object in case error occurred.
Set xlApp = CreateObject("Excel.Application") 'Create an instance of Excel
End If
Set xlWb = xlApp.Workbooks.Add
Set xlWs = xlWb.Worksheets("Sheet1")
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automation Allenc Excel Worksheet Functions 5 January 13th 07 10:42 AM
Automation?? Help in automation Excel Discussion (Misc queries) 1 April 12th 06 02:10 PM
automation Darius New Users to Excel 1 September 23rd 05 07:37 AM
Automation [email protected] Excel Programming 0 December 12th 03 02:52 PM
OLE Automation Bob C. Excel Programming 1 December 9th 03 12:37 AM


All times are GMT +1. The time now is 08:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"