|
-
Sep 8th, 2007, 12:08 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] activex dlls vb6
Can activex dlls be used in vb6 as i cant find out how to call them and use functions, i've got some basic code to test with.
The code in my activex dll(AdditionHelper.dll) in the(Addme.cls):
Code:
Public FirstNumber As Variant
Public SecondNumber As Variant
Function AdditionFunction(FirstNumber, SecondNumber)
AdditionFunction = FirstNumber + SecondNumber
End Function
i'd like to know how to call this dll from my app to use the code
thanks in advance
chris1990
If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.
If you fail, try and try again, its the only way to success.
-
Sep 8th, 2007, 12:32 PM
#2
Re: activex dlls vb6
Replace it all with this:
In your ActiveX dll class:
Code:
Function AdditionFunction(Byval FirstNumber as long, byval SecondNumber as long) as long
AdditionFunction = FirstNumber + SecondNumber
End Function
-------
In VB add:
Code:
Private testDLL as Object
set testdll = createobject("dllname.className here")
msgbox testdll.AdditionFunction(1,1)
Note: This is off the head and untested.
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Sep 8th, 2007, 06:38 PM
#3
Thread Starter
Hyperactive Member
If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.
If you fail, try and try again, its the only way to success.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|