View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Changing Cell Link on Spin Button Form Control

I don't know how to change the linked cell for each spinner currently on a
sheet.

Here is code to create 25 spinners down column B with incrementing linked
cell reference. Maybe that can help?

Sub add_spinner()
With ActiveSheet
For i = 1 To 25
Set cb = .Shapes.AddFormControl(xlSpinner, 70, i * 20, 15, 15)
cb.ControlFormat.LinkedCell = "A" & i
Next
End With
End Sub


Gord

On Wed, 26 Aug 2009 13:50:05 -0700, Adam Ronalds
wrote:

Ok, but I wanted each spinner to have a different cell reference??? In other
words if I have a spinner on each row for 25 rows in Cells B1:B25 and I want
each spinner to reference A1, A2, A3, etc., how do I copy the spinner in cell
B1 into cells B2:B25 and have the cell reference change for the copied
spinners so that I don't have to go into each and change the individual
references?

"Gord Dibben" wrote:

F5SpecialObjectsOK

With all spinners selected right-click on one of them and change the linked
cell.

Will be done to all.


Gord Dibben MS Excel MVP

On Wed, 26 Aug 2009 12:07:02 -0700, Adam Ronalds <Adam
wrote:

I am copying a spin button several times (over 100 spin buttons in this input
spreadsheet) and rather than having to go into the "format control" screen
100+ times, I was hoping that there was a way to quickly and easily change
the cell link for each of the copies spin buttons. I removed the anchors in
the "cell link" filed of the format control however, when I copy and paste
the sin button, this cell link character doesn't change. Is there an quicker
way to change the "cell link" for each copied spin button?