ActiveX Dll

Haluk

Rules Violation
Joined
Oct 26, 2002
Messages
1,075
Hi;

I've prepared a COM AddIn in VB5 to be used in Office2000.

I've managed to add the DLL file to XL2000 and the add-in has a public function which converts a number to string .

Something like;

Public Function yaz(ByRef sayi as double) as string
....
...
End Function

which is placed in a Class Module named "Connect" so that, the COM AddIn installed to XL2000 is "ParaAddIn.Connect"

In VBE, when I give a reference to this DLL (ParaAddIn), I can use the function very well but, when I try to use the same function as standard function in a cell such as

= yaz(A1)

XL2000 does not recognize the function but, the COM AddIn is allready installed.

Can you give me an advice ?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I assume you've made it a COM addin because you want it's functionality to be available in all Office applications and any bespoke ones you have made?

Z
 
Upvote 0
Hi zilpher;

That's correct. I want to use the same function in most of the Office App's and that's why I've preferred to use a COM AddIn.
 
Upvote 0
Hi zilpher;

As per XL2000, I've found a solution for the time being. (May be not a good one but at least it is usable.)

In XL VBE, I've referenced to the DLL and then I placed the following UDF in a standard module to call the function in the DLL.

With the help of this UDF, I was able to use the function in the DLL as an ordinary worksheet function.

The UDF is :

Code:
Function MyYazi(sayi As Double) As String
Dim X As ParaAddIn.Connect
Set X = New ParaAddIn.Connect
MyYazi = X.Yazi(sayi)
End Function


which is to be used as:

=MyYazi(A1)

where the cell A1 houses as value such as 115 and so the UDF named MyYazi returns a string value "Yüz On Bes" which is in Turkish of course.

Thanks for your replies, and I will send you an XL file and the related DLL.
 
Upvote 0
Ok :biggrin: That is exactly what I was going to do, but wanted something to test against

Glad you are up and working

Z
 
Upvote 0

Forum statistics

Threads
1,215,132
Messages
6,123,227
Members
449,091
Latest member
jeremy_bp001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top