Click here to Skip to main content
15,880,364 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one Excel Macro which has VBA Code and this macro has reference to some other VB .dll
so I need to debug excel macro along the reference of VB projects

could you tell me how I can debug ?

What I have tried:

Tried to open excel file in Visual basic
Posted
Updated 24-Jan-19 5:35am

Use the Excel debugger. VBA is not the same as Visual Basic.
 
Share this answer
 
Comments
ahp-1984 24-Jan-19 5:17am    
Thanks for your input. I can debug excel macro code. and my excel macro code is calling some classes of vb dll how I can debug those ?
Richard MacCutchan 24-Jan-19 5:27am    
I don't know if that is even possible, as the DLL would have to be debugged outside of Excel. And unless it was built in debug mode it is unlikely that you could get any information from it. If it is your own DLL then you should be able to use Visual Studio. If it is a third party product then you need to contact the suppliers for help.
Dave Kreskowiak 24-Jan-19 11:50am    
You can't in the VBA debugger. It will not step into external code.
ahp-1984 24-Jan-19 6:05am    
it is my own VB project . how can I move the debugger from Excel to my VB project ?
Richard MacCutchan 24-Jan-19 6:47am    
I have not ever tried that. You need to use Google to find suggestions.
Quote:
could you tell me how I can debug ?

- Open file in XL
- The Alt+F11 to open VBE (integrated Editor for VBA macros)

VBE is where the macro have been included in your XL file, it include debugging tools.

Debugging in Excel VBA - EASY Excel Macros[^]
MS Excel 2013: VBA Debugging Introduction[^]
How to debug Excel VBA - YouTube[^]
 
Share this answer
 
If you open your VB DLL project in Visual Studio, place a suitable breakpoint and then "run" it - obviously nothing will happen at that point.

Now go to your Excel VBE and step into the macro that calls the DLL - at the point of the call to the DLL control should switch to Visual Studio and stop at the break point you had earlier.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900