Command Button

  • Thread starter Thread starter wjd01
  • Start date Start date
W

wjd01

Hello,

I hope someone can help with my question.
Is it possible to have one macro, that when activated by a
command button, make the cell beneath the command button
active? For example, I would have 10 command buttons on
cells C11 thru C20 (one over each cell). If any one of
these are clicked, the cell beneath is now the active
cell.
I'm trying to avoid having 10 individual macros assigned
to the buttons (one per button). I just wasn't sure if
one simple macro could be written that takes into account
the buttons position for setting the active cell.

Thanks in advance,
wjd01
 
If you use buttons from the Forms toolbar they can all have the same macro:

ActiveSheet.Buttons(Application.Caller).TopLeftCell.Select

If you're using the Control Toolbox command button it may be harder...
 

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