Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Using activex dll from worksheet

I have an activex dll on my system.

In VB5 (not VBA) I can set a reference to xyFunctions
I can then call the function func1() with two variant arguments and it
returns a variant.

''''''''''''''''''''''''''
Private xy As xyFuncs

Private Sub Command1_Click()
Dim ret As Variant, arg1 As Variant, arg2 As Variant
Set xy = New xyFuncs
arg1 = "ABC"
arg2 = "DEF"
ret = xy.func1(arg1, arg2)
MsgBox ret
End Sub
''''''''''''''''''''''''''''

Is there a way that I can refer to this activex dll in Excel, such that
it can be used as a worksheet function?

If this is possible, could someone please explain how in words of one
syllable, as I'm feeling particularly stupid on this issue.

Please note that, while it would be nice to be able to pass cell
references to it, I would settle for the ability to call it with
literals, such as:
=xyFunctions.func1("ABC","DEF")

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Using activex dll from worksheet

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


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Steve Garman" wrote in message
...
I have an activex dll on my system.

In VB5 (not VBA) I can set a reference to xyFunctions
I can then call the function func1() with two variant arguments and it
returns a variant.

''''''''''''''''''''''''''
Private xy As xyFuncs

Private Sub Command1_Click()
Dim ret As Variant, arg1 As Variant, arg2 As Variant
Set xy = New xyFuncs
arg1 = "ABC"
arg2 = "DEF"
ret = xy.func1(arg1, arg2)
MsgBox ret
End Sub
''''''''''''''''''''''''''''

Is there a way that I can refer to this activex dll in Excel, such that
it can be used as a worksheet function?

If this is possible, could someone please explain how in words of one
syllable, as I'm feeling particularly stupid on this issue.

Please note that, while it would be nice to be able to pass cell
references to it, I would settle for the ability to call it with
literals, such as:
=xyFunctions.func1("ABC","DEF")



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Using activex dll from worksheet

Thanks Rob,

I knew I was missing something obvious. I just forgot the "Automation"
button was on the Add-ins dialog

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



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 do you use the ActiveX Calendar control in an Excel Worksheet. EricF Excel Worksheet Functions 0 November 10th 04 09:39 PM
Tab support for worksheet activex controls Aaron[_9_] Excel Programming 0 December 30th 03 08:08 PM
tabbing through ActiveX controls on worksheet Mike Rollins Excel Programming 1 October 3rd 03 09:12 PM
Problems with worksheet containing ActiveX controls Deane Yang Excel Programming 1 August 21st 03 04:36 AM
Can't check ActiveX checkbox on worksheet onedaywhen Excel Programming 3 August 9th 03 02:34 AM


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