Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I step a Macro through a spreadsheet
I am trying to find out what a particular macro does as it's not behaving the way I would expect it to. How do I run it in "step Mode" so I can see what each step is doing? Sarah -- Sarahds ------------------------------------------------------------------------ Sarahds's Profile: http://www.excelforum.com/member.php...o&userid=37005 View this thread: http://www.excelforum.com/showthread...hreadid=567313 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I step a Macro through a spreadsheet
First, it's easier to arrange the VBA IDE window and the Excel window so you
can see both at the both together. Put a breakpoint on the line of code from which you want to start stepping through: Left click in the left hand border of the window that contains the code you want to examine. You will get a red dot in the border and that whole line will have be red. It must be an executable line of code i.e NOT a comment or Dim . Trigger you code however it is supposed to start. When you are in Break Mode (by your break point being reached, you can step through the code line-by-line by pressing the F8 keys. You can enter any valid code the Immediate (debug) window, to either set a value or query a value, then press Enter: To check: ?activecell.address [Enter] To set activecell.value="New Value" [Enter] You can remove breakpoints by clicking on the red dot again. Check out Debug in the VBA Help. NickHK "Sarahds" wrote in message ... I am trying to find out what a particular macro does as it's not behaving the way I would expect it to. How do I run it in "step Mode" so I can see what each step is doing? Sarah -- Sarahds ------------------------------------------------------------------------ Sarahds's Profile: http://www.excelforum.com/member.php...o&userid=37005 View this thread: http://www.excelforum.com/showthread...hreadid=567313 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
run macro step by step. excel 2003 | Excel Programming | |||
shortcut key to see a macro running "step by step" | Excel Programming | |||
running macro step by step different from normal run?? | Excel Programming | |||
I need step by step instructions to create a macro for 10 imbedde. | Excel Worksheet Functions | |||
VBA macro step-by-step | Excel Programming |