Stepping through VBA code in Excel

  • Thread starter Thread starter Bill Murphy
  • Start date Start date
B

Bill Murphy

What is the best way to set breakpoints and step through code in Excel VBA?
To edit the VBA code I have to tell Excel to disable macros when I open a
spreadsheet, and then I can't run the code to step through it.

Bill
 
Here is something i use all the time: Sto

Put Stop as the first executable line in the code you want toi step through. The code will cease execution and allow you to step through.
 
Why do you have to disable macros?

If you need to disable only the startup macros, keep the Shift key depressed
while the workbook is opening.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top