Let's say you have 3 buttons which are frequencies, For you to use the OK button you would need to reference the buttons that are selected i.e. option button to say this frequency, then you would press OK which would reference which button is selected then call a macro based on that button
Example Code for the OK button
VBA Code:
If OptionButton1.Value = True Then
Call Macro_Radio1Frequency
ElseIf OptionButton2.Value = True Then
Call Macro_Radio2Frequency
ElseIf OptionButton3.Value = True Then
Call Macro_Radio3Frequency
End If
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.