I am trying to set the max value of an ActiveX spin control button. Here is the code I am trying, for which I get a Runtime error 424 object required:
Private Sub Spinbutton21_Change()
Range("H20").Value = SpinButton1.Value ' the spin button controls the value in cell H20
SpinButton1.Max = ActiveSheet.Range("Y19").Value ' the spin control max value is in cell Y19
SpinButton1.Min = 0 ' spin control min is 0
SpinButton1.SmallChange = 1 ' spin control increment is 1
End Sub
When I click on Debug, the "Range" line is highlighted. When I click on the properties for the spin control, none of the above settings have the correct value.
Thanks.
Bookmarks