Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Add-in functions when starting Excel programmatically

Not sure if this question has already been discussed, I couldnt 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, youll 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.Applicatio
Set oExcel = CreateObject("Excel.Application"
oExcel.Workbooks.Ad
oExcel.Visible = Tru
End Su

Is this an Excel bug or is there something special that needs to be done to load the functions from the add-in

Thanks

  #2   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
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!



  #3   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Add-in functions when starting Excel programmatically

On Tue, 13 Apr 2004 14:16:04 -0700, "Steve K." wrote:

¤ 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?

See if the following helps - the procedure should be the same when using any functionality from the
Analysis TookPak:

HOWTO: Create an Excel Histogram by Using Automation and Analysis ToolPak
http://support.microsoft.com/default...44&Product=vbb

XL2000: Add-Ins Don't Load When Using the CreateObject Command
http://support.microsoft.com/default.aspx?kbid=213489


Paul ~~~
Microsoft MVP (Visual Basic)
  #4   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Add-in functions when starting Excel programmatically

Wrong.

"Paul Clement" wrote in message
...
On Tue, 13 Apr 2004 14:16:04 -0700, "Steve K." wrote:

¤ 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?

See if the following helps - the procedure should be the same when using

any functionality from the
Analysis TookPak:

HOWTO: Create an Excel Histogram by Using Automation and Analysis ToolPak
http://support.microsoft.com/default...44&Product=vbb

XL2000: Add-Ins Don't Load When Using the CreateObject Command
http://support.microsoft.com/default.aspx?kbid=213489


Paul ~~~
Microsoft MVP (Visual Basic)



Reply
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
Who can tell me how to programmatically insert an image into Excel by C#? syf Excel Programming 0 January 13th 04 10:29 AM
Excel - adding control programmatically. Alan B[_3_] Excel Programming 3 December 5th 03 04:34 PM
Subscribing programmatically from Excel via VBA John Noel Excel Programming 0 September 23rd 03 05:47 PM
Excel VBA Programmatically delete a form? Anthony Keefe Excel Programming 0 August 30th 03 10:03 PM
Starting a userform upon starting the file Fritznel Excel Programming 1 July 28th 03 05:37 AM


All times are GMT +1. The time now is 11: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"