engrfurqan
Programmer
- Jan 5, 2009
- 20
I have two standard dll developed in VB and I am calling one of them in vba for word. This dll has a function which calls the other dll and returns an integer which should be passed to vba, code is bellow
/////
Public Declare Function Increment Lib "D:\VBA\VB Library Files\MathLib2.dll" (var2 As Integer) As Integer
Public Declare Function Decrement Lib "D:\VBA\VB Library Files\MathLib2.dll" (var2 As Integer) As Integer
Sub test()
MsgBox (Decrement(2))
MsgBox (Increment(1))
End Sub
/////
Decrement is a function present inside MathLib2.dll and it is not making any call to the other dll "MathLib3.dll" and its working fine
Increment is fucntion which is making a call to the other dll "MathLib3.dll" and returns an integer value. when this statement is excuting word has stoped working and after a while restarts automatically. I have used the same function in exe file and for that its working fine
can anybody help me in this regard.
Regards,
Furqan
/////
Public Declare Function Increment Lib "D:\VBA\VB Library Files\MathLib2.dll" (var2 As Integer) As Integer
Public Declare Function Decrement Lib "D:\VBA\VB Library Files\MathLib2.dll" (var2 As Integer) As Integer
Sub test()
MsgBox (Decrement(2))
MsgBox (Increment(1))
End Sub
/////
Decrement is a function present inside MathLib2.dll and it is not making any call to the other dll "MathLib3.dll" and its working fine
Increment is fucntion which is making a call to the other dll "MathLib3.dll" and returns an integer value. when this statement is excuting word has stoped working and after a while restarts automatically. I have used the same function in exe file and for that its working fine
can anybody help me in this regard.
Regards,
Furqan