07-28-2009 05:21 AM
Hi,
I've got a VI that at one point uses a VBA module (from an excel document)
There's an error in that VBA code which I'm trying to find, so I'd like to debug it.
(But the code can't be debugged separately, it has to be used in the context of the VI. So I will have to debug thru the entire VI.)
The problem is that when I step thru the VI in debugging mode, and get to the place where the VBA module is used, the VI just runs the entire VBA file at once.
I would like it to open the VBA module, and then let me step thru that code, line by line in the VBA debug mode.
But instead it just runs the whole code.
How do I make this work?
07-28-2009 09:43 AM
In these kinds of situations you actually have to initiate the debugging in the other environment, and set up LabVIEW as an external program to start. For example, to debug a DLL that gets called by LabVIEW you'd start the debugger in the IDE that developed the DLL and configure the debugger to first launch LabVIEW. Unfortunately, I don't think the Excel VBA debugger has this capability.
The brute-force method is to sprinkly message boxes or logging statements in your VBA code.