debugging a VB6 dll used in excel

lalbatros

Well-known Member
Joined
Sep 5, 2007
Messages
659
I would enjoy learning how I could debug a VB6 dll launched from the XL environment.

In order to manage a number crunching functionality in an easier way as well as to reduce file size I decided to remote the VBA code to a VB6 dll. This work fine, and I am very happy with it.

But there is now a disadvantage: I don't know how to debug in this situation and I must maintian two versions, one for development fully within xl and the other combining XL and VB6. This implies frequently moving code and it is not confortable.

In the past, I was used to debug J++ dlls launched from XL.
But I don't see how this could be done with VB6.

Any idea?

Thanks
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Try to use VB | Project | <project name> - Properties | Debugging tab.
Select appropriate settings on this tab.
 
Upvote 0
In VB6, start the DLL.

Then in VBA, go into debug, step into the DLL call, and it should take you seamlessly into the DLL.
 
Upvote 0
Here is the only way I know of. From Excel, remove all references to the DLL. Close the references dialog and save the workbook.

Now run your DLL from within Visual Studio. From Excel, VBAIDE, Tools, References, Browse, set a reference to the "currently running" vbp file. NOT the dll file. You cannot debug a dll file on the run in VB.
 
Upvote 0
Thanks a lot, all of you.

In the end it work very much like my familiar J++ - VS environment.
I just had re-organize myself a little bit with the references.

Thanks
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,726
Members
449,465
Latest member
TAKLAM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top