Thanks for the response. I'll try to clarify what I'm trying to do.
I'm trying to write a macro that I will link to a button on my mouse.
When the button is pressed, the active cell will jump 3 cells to the
right. But if there are 2 vertically adjacent cells active, it will
jump 6 cells to the right. If three vertically adjacent cells are
selected, the active cell will jump 9 cells to the right. And so forth.
The number of vertically adjacent cells active will modify the jump
size.
But here's the hitch. If only one cell is active, I want the subroutine
to repeat the previous jump size.
To accomplish this, I want my single subroutine to remember a value "x"
which will store the number of vertically adjacent cells that were
selected in the previous execution. This way, whatever I set my jump
size to be will persist until I change it by selecting a different
number of vertically adjacent cells when I press the button.
Does this make sense?
In summary, I want to create a single subroutine, that remembers the
value of "x" from execution to execution.