One spinner that controls whichever cell I select

D

downward spiral

I have a worksheet with multiple numeric values which are changed very
frequently. I would like to be able to just make one spinner to control
'selected cell' or 'highlighted cell'. Is this possible? I understand I can
link the spinner to (example) A2 but is there a code that means 'selected
cell' where I could just click on cell A3 or A4 and use the spinner to change
just A3 and just A4?

If this is not possible I will need to make a separate spinner next to each
and every number field on my worksheet which seems monotonous. If this is the
method you would suggest, how could I just create one row with multiple
spinners and have that one row copied downward till the end of the document.
I tried copy + paste but the spinners are still controlling the cell from the
area I copied and I have to re-edit the linked cell for all pasted spinners.
 
J

John Bundy

All is possible through Excel!! just kidding but here you go:

Private Sub SpinButton1_SpinDown()
ActiveCell.Value = ActiveCell.Value - 1
End Sub

Private Sub SpinButton1_SpinUp()
ActiveCell.Value = ActiveCell.Value + 1
End Sub
 
D

downward spiral

Oh my god, finally! Thank you so much John Bundy! I've been asking all over
the internet and you're the only one that knew.
 

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

Top