Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default "Error in loading DLL", VB6 ActiveX DLL


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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default "Error in loading DLL", VB6 ActiveX DLL


Maybe it's a stupid question, but is your dll located in the SYSTEM32
folder?



"Scott" schreef in bericht
...

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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default "Error in loading DLL", VB6 ActiveX DLL


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

"moon" wrote:


Maybe it's a stupid question, but is your dll located in the SYSTEM32
folder?



"Scott" schreef in bericht
...

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!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default "Error in loading DLL", VB6 ActiveX DLL

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

"Scott" wrote in message
...

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!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default "Error in loading DLL", VB6 ActiveX DLL

The code executes just fine if I run the VB6 project and then set the Excel
reference to the .vbp file vs the dll.


The Excel VBA code to call the dll class module is the following:

€˜SeayCAD.dll is the name of the dll

Dim clsProjectInfo As SeayCAD.C_ProjectInfo

Private Sub CommunicateToDLL_ProjectInfo()
Set clsProjectInfo = New SeayCAD.C_ProjectInfo
Set clsProjectInfo.ExcelApp = Application
End Sub


When I debug the Excel VBA code, it highlights the €œExcelApp€ property and
shows the €œError in loading dll€ message box.


The VB6 dll code for the ExcelApp property is the following:

Public Property Set ExcelApp(ByRef xlApp As Excel.Application)
Set mxlApp = xlApp
End Property


Hopefully, this will give you more to go on! Thanks.


"NickHK" wrote:

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

"Scott" wrote in message
...

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!







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default "Error in loading DLL", VB6 ActiveX DLL

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

"Scott" wrote in message
...
The code executes just fine if I run the VB6 project and then set the

Excel
reference to the .vbp file vs the dll.


The Excel VBA code to call the dll class module is the following:

'SeayCAD.dll is the name of the dll

Dim clsProjectInfo As SeayCAD.C_ProjectInfo

Private Sub CommunicateToDLL_ProjectInfo()
Set clsProjectInfo = New SeayCAD.C_ProjectInfo
Set clsProjectInfo.ExcelApp = Application
End Sub


When I debug the Excel VBA code, it highlights the "ExcelApp" property and
shows the "Error in loading dll" message box.


The VB6 dll code for the ExcelApp property is the following:

Public Property Set ExcelApp(ByRef xlApp As Excel.Application)
Set mxlApp = xlApp
End Property


Hopefully, this will give you more to go on! Thanks.


"NickHK" wrote:

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

"Scott" wrote in message
...

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!







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Document not saved" "error in loading DLL" Tracey L Excel Discussion (Misc queries) 0 December 1st 08 12:57 PM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM
"error loading DLL" message SteveH Excel Discussion (Misc queries) 0 January 16th 06 08:53 AM
Can ActiveX controls be "disabled" and "enabled"? William DeLeo Excel Programming 1 May 7th 04 09:10 PM
Excel automation "Error loading DLL" Paul Hewson Excel Programming 0 January 5th 04 08:34 PM


All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"