Hello guys. I'm having trouble tryin to declare a function from a dll, in a test case I'm not bein' able to use a function that i made using visual basic in a dll.
Error 453 gets on my way no matter what i do.
The code in the VBA on excel is:
The code usin' in the dll is:
The code on Visual Basic works for sure cause I tested on other application created in VB
Any lights?
Error 453 gets on my way no matter what i do.
The code in the VBA on excel is:
Code:
Declare Function TestReturn Lib "[I](Path to dll folder)\JMSys.dll[/I]" () As Double
Sub teste()
MsgBox TestReturn
End Sub
The code usin' in the dll is:
Code:
Public Module LinearAlgebra
Public Function ModulusOfVector(ByRef x As Double()) As Double
Dim sum As Double
Dim i As Long
For i = LBound(x) To UBound(x)
sum = sum + x(i) ^ 2
Next i
Return sum ^ (0.5)
End Function
Public Function TestReturn(x As Double) As Double
TestReturn = 3
End Function
End Module
The code on Visual Basic works for sure cause I tested on other application created in VB
Any lights?