ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change Option Button Property Value with VBA (https://www.excelbanter.com/excel-programming/298345-change-option-button-property-value-vba.html)

Jm

Change Option Button Property Value with VBA
 
Hi,

I need to mirror the Value of a Option Button (List2) when Option Button
(List1) is clicked on.

Note: List1 and List2 are in different Option Button Groups.

The code below give me an "Object Required" error.

What do I need to change?

Private Sub List1OB_Click()
With Object.List2OB
.Value = True
End With
End Sub

Thanks,
Jim



Chip Pearson

Change Option Button Property Value with VBA
 
Use
With Me.List2OB
.Value = True
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jm" wrote in message
...
Hi,

I need to mirror the Value of a Option Button (List2) when

Option Button
(List1) is clicked on.

Note: List1 and List2 are in different Option Button Groups.

The code below give me an "Object Required" error.

What do I need to change?

Private Sub List1OB_Click()
With Object.List2OB
.Value = True
End With
End Sub

Thanks,
Jim






All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com