Macro help

MrPShah

Member
Aug 13, 2002
86
0
0
I have a macro in Excel and I'm trying to track where it goes wrong, is there a way to go step by step and see what it's doing?
 

AtTheGates

Senior member
Jun 11, 2003
274
0
0
By clicking in the gray bar to the left of the code you can set breakpoints. Execution will stop at these points and you can hover the mouse over variables to check their values.
 

HKSturboKID

Golden Member
Oct 20, 2000
1,816
0
0
I just start playing with macro in excel. If I remember correctly, if there is any errors in your code, it will stop and ask if you wish to debug which will leave you at the point of the error.
 

WW

Golden Member
Jun 21, 2001
1,514
0
0
Debug on the menu....then "Step into" and keep hitting F8 to go line by line....

the "hover the mouse over the variables" feature works then too... in the previously executed line to see what the variables are...very handy

you can drag the little yellow arrow point over lines of code if you don't want them to execute or if you want to repeat a line, etc

check out the debug menu for more options...like run to cursor..handy if your error is after a big loop or something and you don't want to step through it all