Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi !
My VBA code calls a VB6 dll. At present, not knowing otherwise, I compile my dll in vb6 (using exit subs in place of stop points), then open Excel and my workbook, try the dll and so forth. This is painstakingly long. There must be a better way, trying out the dll in VB without compiling it. Anyone know how to ? (I guess this is really a VB question...) Thanks. Pat |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pat,
This question was asked a couple of days ago. You should be able to debug the VB6 DLL while calling its methods from within VBA. To do this, open the project in VB6, and step into it, and step through all tyhe in itialisation code until it is fully initialised. Then go to your VBA project, and step into that. Calls into the DLL will then step into that project. With this, you can set breakpoints, use the watch and immediate windows as with any VB/VBA project. -- HTH RP (remove nothere from the email address if mailing direct) "PM" wrote in message ... Hi ! My VBA code calls a VB6 dll. At present, not knowing otherwise, I compile my dll in vb6 (using exit subs in place of stop points), then open Excel and my workbook, try the dll and so forth. This is painstakingly long. There must be a better way, trying out the dll in VB without compiling it. Anyone know how to ? (I guess this is really a VB question...) Thanks. Pat |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "PM" schreef in bericht ... Hi ! My VBA code calls a VB6 dll. At present, not knowing otherwise, I compile my dll in vb6 (using exit subs in place of stop points), then open Excel and my workbook, try the dll and so forth. This is painstakingly long. There must be a better way, trying out the dll in VB without compiling it. Anyone know how to ? (I guess this is really a VB question...) Thanks. Pat Not sure if this will help, but when creating a DLL for Excel or any Office component, I always create an executable in VB which forces the DLL to do exactly the same thing. This way I test my DLL first in VB, and if I'm sure it works, I start writing the VBA-calls. You can also create a class module in Excel first, put all your code in there, and if you're sure it works, then put it in a DLL. To answer your other question about 10 DLL's or 10 classes - I would prefer 1 DLL, since 10 different DLL's might be confusing for both user and you. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Pm,
My VBA code calls a VB6 dll. At present, not knowing otherwise, I compile my dll in vb6 (using exit subs in place of stop points), then open Excel and my workbook, try the dll and so forth. This is painstakingly long. There must be a better way, trying out the dll in VB without compiling it. Anyone know how to ? (I guess this is really a VB question...) Start by opening the VB6 dll in VB6 and clicking Debug Start with full compile Now switch to Excel and open the workbook. In the VBE, check Tools References to ensure the workbook is referencing the VB6 project (not the dll). Once done, I find that pressing F8 steps through both the VBA and VB6 code, switching IDEs as appropriate. Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I resolve debug error macro Excel 2000? At least, any lead | Excel Discussion (Misc queries) | |||
Can i turn off the debug side of Excel? | Excel Discussion (Misc queries) | |||
Range.calculate debug, Excel 2000 VBA compatability with Excel XP | Excel Programming | |||
VBA Crashes Excel on Compile or Stop Debug | Excel Programming | |||
Debug/Compile: Compilng excel macros? What it generates? | Excel Programming |