Hi,
I am a complete NEWBY in VB(A).
I have a problem with accessing a DLL in my VBA-script.
The DLL is written in Delphi and if called by another Delphi apllication no errors are present.
I have declared the dll in my script as:
-------
Public Declare Function dllOpenDB Lib "vbaProgress.dll" Alias "OpenDatabase" As Integer
----
Public Declare Function qryZoekDealer Lib "H:\Apps\NetFile\vbaProgress.dll" Alias "ZoekDealer" (ByVal iDealer As Long) As Boolean
------
Till so far no problems. But after when I call the function "qryzoekdealer" for the second time then the vba appl. is hanging.
Now they told to write a COM/ActiveX instead of a oldfashioned DLL. So I did BUT i do not know HOW to declare or use the new Component.
I have registrered it with the vba appl using File-->Reference.
The name off the COM is comProgress.DLL and the classname is ConnectWithProgress.
Also this COMponent is working fine in a delphi-delphi connection.
I tried the folowing code without any luck:
------
'create a object reference to the component
Dim obj As comProgress.ConnectWithProgress
'create an instance of the object
Set obj = New ConnectWithProgress
'call the objects dllOpenDB method
obj.dllOpenDB
'end procedure
-------
Hope somebody can help me
Wim
I am a complete NEWBY in VB(A).
I have a problem with accessing a DLL in my VBA-script.
The DLL is written in Delphi and if called by another Delphi apllication no errors are present.
I have declared the dll in my script as:
-------
Public Declare Function dllOpenDB Lib "vbaProgress.dll" Alias "OpenDatabase" As Integer
----
Public Declare Function qryZoekDealer Lib "H:\Apps\NetFile\vbaProgress.dll" Alias "ZoekDealer" (ByVal iDealer As Long) As Boolean
------
Till so far no problems. But after when I call the function "qryzoekdealer" for the second time then the vba appl. is hanging.
Now they told to write a COM/ActiveX instead of a oldfashioned DLL. So I did BUT i do not know HOW to declare or use the new Component.
I have registrered it with the vba appl using File-->Reference.
The name off the COM is comProgress.DLL and the classname is ConnectWithProgress.
Also this COMponent is working fine in a delphi-delphi connection.
I tried the folowing code without any luck:
------
'create a object reference to the component
Dim obj As comProgress.ConnectWithProgress
'create an instance of the object
Set obj = New ConnectWithProgress
'call the objects dllOpenDB method
obj.dllOpenDB
'end procedure
-------
Hope somebody can help me
Wim