"Error in loading DLL", VB6 ActiveX DLL

S

Scott

If anyone can help me, I will be very appreciative.

I've written an ActiveX DLL that has mysteriously stopped working on my
development machine but works fine on another test machine. Each machine has
the same version of Excel (i.e. 2003) and is running the same dll and xls
file. However, on the development machine, the code will execute in debug
mode without errors (reference made to vbp file vs dll). I have tried a lot
of things to resolve the issue: OS LiveUpdate, Office Update, delete dll from
registry, register / unregister dll via regsvr32, checked dll using
Dependency Walker, etc but nothing has helped. Ideas anyone? Thanks!
 
S

Scott

No, it isn't but I just put it there and changed the reference.
Unfortunately, I received the same result. Thanks for the idea.
 
N

NickHK

Scott,
By "the code will execute in debug mode without errors", you mean in the VB6
IDE ?
And in Excel, you set a reference to the DLL ?
Instantiate the object ?

A bit more info the error/not working may help us.

NickHK
 
N

NickHK

Scott,
This works for me, which is the same as your code:

'<cXLTest Class module in Test.DLL>
'Reference set to Excel
Dim XLApp As Excel.Application

Public Property Set ExcelApp(vData As Excel.Application)
Set XLApp = vData
MsgBox "Excel set"
End Property

'<Code in Excel WS>
'Reference set to Test.DLL
Dim NewObj As Test.cXLTest

Private Sub CommandButton1_Click()
Set NewObj = New Test.cXLTest
Set NewObj.ExcelApp = Application

Set NewObj.ExcelApp = Nothing
Set NewObj = Nothing
End Sub

But from the error you get, it seems that error is not related to this, as
the dll is not loaded properly.
What about code in Initialise and/oe Sub Main routine ?

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top