I'm transferring a workbook from an XP -> XP box. It references a custom DLL and all worked OK on the old box. But this has me beat. I get the Error in loading DLL (Error 48) but I can see all of the DLL classes and their members in the Object Browser. XL can obviously see the reference and can see the entry points. But it can't "load" the DLL????????? I must admit to being a bit rusty on my XL VBA, so maybe I'm missing something (hopefully ) obvious.
Alan
Error loading DLL - XL2003
-
- BronzeLounger
- Posts: 1545
- Joined: 26 Jan 2010, 11:36
- Location: Melbourne, Australia
-
- Microsoft MVP
- Posts: 656
- Joined: 24 Jan 2010, 17:51
- Status: Microsoft MVP
- Location: Weert, The Netherlands
Re: Error loading DLL - XL2003
Has the dll been registered with windows?
-
- BronzeLounger
- Posts: 1545
- Joined: 26 Jan 2010, 11:36
- Location: Melbourne, Australia
Re: Error loading DLL - XL2003
Yep. Like I said, it appears in the object browser plain as day. This is the initialization code when the workbook opens:Jan Karel Pieterse wrote:Has the dll been registered with windows?
Code: Select all
Option Explicit
Public nscSebacs As NamesColl
Public blnVarsOK As Boolean
Public SebacsIni As INIAPI
Public SebacsParams As DocParams
Public allNames As NameScope
Public ColHdr
Public Sub StartUp()
Dim i As Integer
'Create a namescope object for the nsNames table
Set allNames = New NameScope
allNames.Init ThisWorkbook, Names("nsNames") 'This call generates the error
Alan
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Error loading DLL - XL2003
Could the DLL reference another DLL that is not present on the "target" PC?
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1545
- Joined: 26 Jan 2010, 11:36
- Location: Melbourne, Australia
Re: Error loading DLL - XL2003
I don't believe so, but I'll have to scour the code of all the classes I think, and go through with a fine-toothed comb. Unfortunately I don't have the DLL build source, just the code for all the classes it contains... maybe a rebuild job. But something you might know in the meantime. I have unlocked the VBA project for viewing (works OK) but each time I open the workbook and use the Tools -> References menu in the VBE, I still get the password prompt. Any way to get rid of this prompt?HansV wrote:Could the DLL reference another DLL that is not present on the "target" PC?
Alan
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Error loading DLL - XL2003
I know of only one password for the Visual Basic Project, I don't know what would cause a password prompt if you select Tools | References.
Best wishes,
Hans
Hans
-
- Microsoft MVP
- Posts: 656
- Joined: 24 Jan 2010, 17:51
- Status: Microsoft MVP
- Location: Weert, The Netherlands
Re: Error loading DLL - XL2003
Did you actually remove the password from the boxes?
-
- BronzeLounger
- Posts: 1545
- Joined: 26 Jan 2010, 11:36
- Location: Melbourne, Australia
Re: Error loading DLL - XL2003
No, I hadn't, but that did the trick. I never realized that... I thought of that dialog as simply a sort of on/off for project access. Obviously the checkbox just affects viewing of the project, but the presence of a password protects against changes. Is that correct?Jan Karel Pieterse wrote:Did you actually remove the password from the boxes?
Alan
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands