ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DLL will not run (https://www.excelbanter.com/excel-programming/315449-dll-will-not-run.html)

[email protected]

DLL will not run
 
I have a DLL that has been created in VB6. It works with norml VB6 exe
projects.

When I look at the object browser in Excel it shows all of the classses
as being exposed. Excel even allows the quick complete of properties
and methods within the DLL. However as soon as the debugger crosses
the line with the first piece of code it simply crashes. It doesn't
crash the whole of Excel, it just stops the step though within the VBA
code.

No erros, I have an error handler and the options turned to break on
all errors.

The DLL is in the references as well.

Any ideas?


Bob Phillips[_6_]

DLL will not run
 


--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have a DLL that has been created in VB6. It works with norml VB6 exe
projects.

When I look at the object browser in Excel it shows all of the classses
as being exposed. Excel even allows the quick complete of properties
and methods within the DLL. However as soon as the debugger crosses
the line with the first piece of code it simply crashes. It doesn't
crash the whole of Excel, it just stops the step though within the VBA
code.

No erros, I have an error handler and the options turned to break on
all errors.

The DLL is in the references as well.

Any ideas?




Bob Phillips[_6_]

DLL will not run
 
Try opening the VB6 project in VB6, and step into it - nothing should happen
other than it waits.

Then step into VBA, should be able to step into the VB6 then (haven't
actually done it myself with VBA and VB6, but done it with VB6 DLLs and a
VB6 exe, so it's a bit theory)

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have a DLL that has been created in VB6. It works with norml VB6 exe
projects.

When I look at the object browser in Excel it shows all of the classses
as being exposed. Excel even allows the quick complete of properties
and methods within the DLL. However as soon as the debugger crosses
the line with the first piece of code it simply crashes. It doesn't
crash the whole of Excel, it just stops the step though within the VBA
code.

No erros, I have an error handler and the options turned to break on
all errors.

The DLL is in the references as well.

Any ideas?




Presspley

DLL will not run
 
Do you mean some how debugging the DLL in VB6 while Excel is running?
Ie somehow the two will work together?


"Bob Phillips" wrote in message ...
Try opening the VB6 project in VB6, and step into it - nothing should happen
other than it waits.

Then step into VBA, should be able to step into the VB6 then (haven't
actually done it myself with VBA and VB6, but done it with VB6 DLLs and a
VB6 exe, so it's a bit theory)

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have a DLL that has been created in VB6. It works with norml VB6 exe
projects.

When I look at the object browser in Excel it shows all of the classses
as being exposed. Excel even allows the quick complete of properties
and methods within the DLL. However as soon as the debugger crosses
the line with the first piece of code it simply crashes. It doesn't
crash the whole of Excel, it just stops the step though within the VBA
code.

No erros, I have an error handler and the options turned to break on
all errors.

The DLL is in the references as well.

Any ideas?


Chip Pearson

DLL will not run
 
You can debug the VB6 DLL while calling its methods in Excel/VBA.
Open the project in VB6 and press F5 to run it, and then in
Excel/VBA, ensure that the Reference is set to the VBProject, not
the DLL. Then you can set breakpoints and step through the VB6
code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Presspley" wrote in message
om...
Do you mean some how debugging the DLL in VB6 while Excel is
running?
Ie somehow the two will work together?


"Bob Phillips" wrote in
message ...
Try opening the VB6 project in VB6, and step into it - nothing
should happen
other than it waits.

Then step into VBA, should be able to step into the VB6 then
(haven't
actually done it myself with VBA and VB6, but done it with VB6
DLLs and a
VB6 exe, so it's a bit theory)

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have a DLL that has been created in VB6. It works with
norml VB6 exe
projects.

When I look at the object browser in Excel it shows all of
the classses
as being exposed. Excel even allows the quick complete of
properties
and methods within the DLL. However as soon as the debugger
crosses
the line with the first piece of code it simply crashes. It
doesn't
crash the whole of Excel, it just stops the step though
within the VBA
code.

No erros, I have an error handler and the options turned to
break on
all errors.

The DLL is in the references as well.

Any ideas?




Bob Phillips[_6_]

DLL will not run
 
Yes, that is exactly what I mean.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Presspley" wrote in message
om...
Do you mean some how debugging the DLL in VB6 while Excel is running?
Ie somehow the two will work together?


"Bob Phillips" wrote in message

...
Try opening the VB6 project in VB6, and step into it - nothing should

happen
other than it waits.

Then step into VBA, should be able to step into the VB6 then (haven't
actually done it myself with VBA and VB6, but done it with VB6 DLLs and

a
VB6 exe, so it's a bit theory)

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have a DLL that has been created in VB6. It works with norml VB6

exe
projects.

When I look at the object browser in Excel it shows all of the

classses
as being exposed. Excel even allows the quick complete of properties
and methods within the DLL. However as soon as the debugger crosses
the line with the first piece of code it simply crashes. It doesn't
crash the whole of Excel, it just stops the step though within the VBA
code.

No erros, I have an error handler and the options turned to break on
all errors.

The DLL is in the references as well.

Any ideas?




Presspley

DLL will not run
 
Of course you never get these flash things to work first time but I am
intrigued.

So I have my VB6 DLL open in VB6. I have change the compatability to
Project Compatibility and deleted any reference to the compiled DLL
that I use (i tried this several ways). I then go back to VBA in
Excel and delete the old reference, save, debug just to make sure it
has broken the link. Then I reference the VBA code to the vbp file of
my DLL and try to run it. It crashes with a 429 error which is a
start as at least I have a eral error.

Any ideas on what setting I might be getting wrong?


"Bob Phillips" wrote in message ...
Yes, that is exactly what I mean.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Presspley" wrote in message
om...
Do you mean some how debugging the DLL in VB6 while Excel is running?
Ie somehow the two will work together?


"Bob Phillips" wrote in message

...
Try opening the VB6 project in VB6, and step into it - nothing should

happen
other than it waits.

Then step into VBA, should be able to step into the VB6 then (haven't
actually done it myself with VBA and VB6, but done it with VB6 DLLs and

a
VB6 exe, so it's a bit theory)

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
I have a DLL that has been created in VB6. It works with norml VB6

exe
projects.

When I look at the object browser in Excel it shows all of the

classses
as being exposed. Excel even allows the quick complete of properties
and methods within the DLL. However as soon as the debugger crosses
the line with the first piece of code it simply crashes. It doesn't
crash the whole of Excel, it just stops the step though within the VBA
code.

No erros, I have an error handler and the options turned to break on
all errors.

The DLL is in the references as well.

Any ideas?



All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com