One Radio Button To Trigger Another Radio Button On Different Excel Sheet (Same Workbook)

rameezl17

Board Regular
Joined
Mar 6, 2018
Messages
105
Hi All,

I have a radio button on sheet1 module 1 called (Sec1No). this is the code :

Sub Sec1No
MsgBox "blah"
End Sub

Then I have a radio button on sheet2 module2.

Is it possible that when the user clicks on the first radio button sheet 1 to then automatically check the radio button on sheet 2?

Thank you for your help!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Syntax:
Code:
Application.Run ([COLOR=#000080]"[/COLOR][COLOR=#ff0000]'[/COLOR]My other workbook name.xlsm[COLOR=#ff0000]'[/COLOR]!MyProcedureName[COLOR=#000080]"[/COLOR])
The other workbook MUST be open
If the code is in a sheet module then it must be included too


Code:
Sub callBlah()
Application.Run ("'[COLOR=#ff0000]Blah.xlsm[/COLOR]'![COLOR=#000080]Sheet1[/COLOR].[B]OptionButton1_Click[/B]")
End Sub
Runs procedure OptionButton1_Click which is in sheet1's module in workbook Blah.xlsm
 
Upvote 0
Hey Yongle,

So both radio buttons are in the same workbook, just different sheet.

Im a little lost.

so in sheet 1 module 1 which is the first radio button, I would reference the radio button that is in sheet 2, right?
 
Upvote 0
With everything in the same workbook:

If the VBA that you want to run is in the sheet module for sheet1
Code:
Call Sheet1.Sec1No
If the VBA that you want to run is in the sheet module for sheet2
Code:
Call Sheet2.Sec1No
If the VBA that you want to run is in a standard module
Code:
Call Sec1No
 
Upvote 0
Are there sets of option buttons (so select from multiple options), or just one? If there's just one (to check or uncheck, or indicate yes or no), it's customary to use a checkbox.

If there are multiple (matching) option buttons on both sheets, you could simply use the same link cell. Changing the link cell value with one set of buttons will cause the other set of buttons to update their state.

If there is a checkbox on each sheet, again use a single link cell. Checking one box will change the link cell, and that will change the other checkbox.
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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