• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SpinButtons - adapt to current cell?

Knaledge

New Member
Hey everyone! Really quick...


I enable Design Mode, insert ActiveX Control > SpinButton. I resize it to how I want it to look. I place it in one of the (500+) cells I need. It sizes up fine. I open the properties, I make the active cell H8.


Now, when I copy/paste the control to every other cell below it (formatted identically), the SpinButton changes H8.


I know I can just manually point each control to its relative cell but... that's going to take a ridiculous amount of time.


Is there any way to automate this change so that each SpinButton controls the cell its currently in, so I can just copy/paste the SpinButton into each cell?


This excel doc is used to track feedback and I want to have one row represent one feedback submission. "This sucks". In the columns to the right of that cell which contains the feedback, I want two columns: UP and DOWN. Up = positive feedback and people that agree with it. Down = negative feedback and people that agree with it.


Each person that agrees, I click the SpinButton up, once. Negative/disagree? next column, down once. Each column contains a number, incremented by the SpinButton accordingly.


Help? Please and thank you! Need this fairly urgently
 
Try this macro

[pre]
Code:
Sub Lots_of_spinners()

Dim Link As String
Dim x As Integer

For x = 1 To 10   ' Change to suit how many rows you want to add

Link = ActiveSheet.Cells(7 + x, 8).Address  'Assumes Row 8 (7+1) to start

ActiveSheet.Spinners.Add(336, x * 11.25 + 67.5, 42, 11.25).Select

With Selection
.Value = 0 'Default Cell Value
.Min = 0
.Max = 30000
.SmallChange = 1
.LinkedCell = Link
.Display3DShading = True
End With

Next

End Sub
[/pre]
 
Back
Top