Option Buttons as Radio Buttons

brendalpzm

Board Regular
Joined
Oct 3, 2022
Messages
59
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
Platform
  1. Windows
I'm using activeX controls, and I'm wondering if there's a way to use command buttons as option (radio) buttons and link the result to a cell,

For example if I link thebuttons to the A1 cell, when I click on button 1 the result shows up in A1, and if I click on button 2 the result changes in A1

Idk if I explained myself :S
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks for posting on the forum.

I don't understand your explanation at all.
In order for me to better understand the problem, I would like to ask a few questions:
- The 2 combos point to the same cell A1?
- What value do you want to put in cell A1 when you press button1?
- What value do you want to put in cell A1 when you press button2?

I include an example, maybe I can hit what you want.
VBA Code:
Private Sub CommandButton1_Click()
  Range("A1").Value = "bt1"
End Sub

Private Sub CommandButton2_Click()
  Range("A1").Value = "bt2"
End Sub

Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor
----- --
 
Upvote 1
Solution
Thanks for posting on the forum.

I don't understand your explanation at all.
In order for me to better understand the problem, I would like to ask a few questions:
- The 2 combos point to the same cell A1?
- What value do you want to put in cell A1 when you press button1?
- What value do you want to put in cell A1 when you press button2?

I include an example, maybe I can hit what you want.
VBA Code:
Private Sub CommandButton1_Click()
  Range("A1").Value = "bt1"
End Sub

Private Sub CommandButton2_Click()
  Range("A1").Value = "bt2"
End Sub

Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor
----- --
actualy your solution worked pretty well thanks~!
 
Upvote 1

Forum statistics

Threads
1,223,155
Messages
6,170,405
Members
452,325
Latest member
BlahQz

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