Changing Spinbutton Max/Min with Option Button

3link

Board Regular
Joined
Oct 15, 2010
Messages
138
I have a spin button (active x) with variable max/min values that I wish to change depending on the selection of any of three option buttons (form controls). I can't seem to write a macro to make the max/min of the spin button change when one of the three buttons are clicked. I have tried:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
Code:
 [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Sub OptionButton155_Click()[/FONT][/COLOR]
[FONT=Verdana][COLOR=black]With SpinButton1[/COLOR][/FONT]
[FONT=Verdana][COLOR=black]       .Min = 0[/COLOR][/FONT]
[FONT=Verdana][COLOR=black]       .Max = 4<o:p></o:p>[/COLOR][/FONT]
[COLOR=black][FONT=Verdana]       End With[/FONT][/COLOR]
[FONT=Verdana][COLOR=black]End Sub<o:p></o:p>[/COLOR][/FONT]
<o:p></o:p>
<o:p></o:p>
When I attempt to run this macro, I get an error: "Run-time error '424: Object required." Is there another way to achieve the desired effect?<o:p></o:p>
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,224,583
Messages
6,179,671
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top