Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to call COM Add-In functions from a macro

I am new to COM Add-Ins and have implemented the
Microsoft example:
HOW TO: Build an Office COM Add-in by Using Visual
Basic .NET
Reg: http://support.microsoft.com/default.aspx?
kbid=302896

This worked fine. However, it only shows how to include a
user defined button. I wish to add additional member
functions to the connect class, or a new class, that can
be called from macros within Excel.

I am using vb.Net 2002 and Excel XP.

Any help much appreciated.


Regards:

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How to call COM Add-In functions from a macro

Graham,

Here is an article that shows how. It is not .Net based, but you should
still be able to apply

HOWTO: Create a Visual Basic Automation Add-in for Excel Worksheet Functions
http://support.microsoft.com/default.aspx?kbid=285337

--

HTH

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

"Graham" wrote in message
...
I am new to COM Add-Ins and have implemented the
Microsoft example:
HOW TO: Build an Office COM Add-in by Using Visual
Basic .NET
Reg: http://support.microsoft.com/default.aspx?
kbid=302896

This worked fine. However, it only shows how to include a
user defined button. I wish to add additional member
functions to the connect class, or a new class, that can
be called from macros within Excel.

I am using vb.Net 2002 and Excel XP.

Any help much appreciated.


Regards:



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to call COM Add-In functions from a macro

Bob,

Thanks for the reference. I have tried to adapt the VB6 Automation ideas but have got in a bit of a muddle. In my original attempt based on:

HOWTO: Create a Visual Basic Automation Add-in for Excel Worksheet Functions
http://support.microsoft.com/default.aspx?kbid=285337

the COM Add-In loads and the OnConnection routines operate and bring up messages when the Add-In loads. The problem is that I cannot access any functions that I include from Excel macros. I just cannot seem to access the Add-In direct. Also, I cannot see the Add-In under tools/Addins even though I know it has loaded.

Sorry if I am being stupid :-)

Regards,

Graham
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How to call COM Add-In functions from a macro

Graham,

What version of Excel do you have? I ask because I have just read the
article, and it specifically mentions XL2002. I re-created the example using
XL2002, and when I clicked the Automation tab, that created the ProgId
registry key mentioned in the other article. And everything worked fine
(except the functions seemed odd<g).

Then I tried to repeat it in XL2000, and I got the same results as you. I
manually created the I knew the addin loaded (I added a MsgBox to prove it),
but I couldn't see it either, or run those functions.

--

HTH

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

"Graham" wrote in message
...
Bob,

Thanks for the reference. I have tried to adapt the VB6 Automation ideas

but have got in a bit of a muddle. In my original attempt based on:

HOWTO: Create a Visual Basic Automation Add-in for Excel Worksheet

Functions
http://support.microsoft.com/default.aspx?kbid=285337

the COM Add-In loads and the OnConnection routines operate and bring up

messages when the Add-In loads. The problem is that I cannot access any
functions that I include from Excel macros. I just cannot seem to access
the Add-In direct. Also, I cannot see the Add-In under tools/Addins even
though I know it has loaded.

Sorry if I am being stupid :-)

Regards,

Graham



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
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
What do you call values used with a functions? Patty Excel Worksheet Functions 3 July 23rd 07 06:07 PM
Can you call functions between sheets in the same book in excel? Arenlor Excel Worksheet Functions 3 January 7th 06 03:21 AM
How to call worksheet functions from Access ? Martin Plamondon Excel Worksheet Functions 0 November 18th 04 06:50 PM


All times are GMT +1. The time now is 05:56 AM.

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

About Us

"It's about Microsoft Excel"