When I'm looking at my code in the code window, I can't seem
to make the code run.
If I click on the Run button, a dialog pops up, asking what
Macro I want to run.
If I click on the StepThru button, nothing seems to happen.
What am I missing?
Put a breakpoint in your code. Either click on the grey area left of
your code, or Right-click, Toggle, Breakpoint. This will put a red
circle in the grey area, turn the line of code white with a red
background.
Now start your code. Push the button that calls it, or open the
immediate window (Ctrl-G) and type the name of the Subroutine and hit
enter or type PRINT and then the name of the function and hit enter.
Your code will start executing, and it will stop at the breakpoint you
set. Your code is actually running, it's just paused. If you hover
over a variable, it will give you the current value. This is useful
when debugging loops.
After you've stopped, F8 will single step through the code, F5 will
run full speed until it comes to the end of the function/sub or it
hits another breakpoint.
Hope this helps,
Chris M.