ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I select an option button using code (https://www.excelbanter.com/excel-programming/403731-how-do-i-select-option-button-using-code.html)

Ayo

How do I select an option button using code
 
I have an option group with two option button. I am trying to select one of
them using code. I tried:
Me.OptProject.Enabled=True
and
Me.OptProject.SetFocus
Neither worked. Any ideas?
Thanks
Ayo

Carim[_2_]

How do I select an option button using code
 
Hi,

Did you check its name ...

OptionButton1 or OptionButton2 ...

HTH



Nigel[_2_]

How do I select an option button using code
 
Try......

Me.OptProject.Value = True

--

Regards,
Nigel




"Ayo" wrote in message
...
I have an option group with two option button. I am trying to select one of
them using code. I tried:
Me.OptProject.Enabled=True
and
Me.OptProject.SetFocus
Neither worked. Any ideas?
Thanks
Ayo




All times are GMT +1. The time now is 12:08 PM.

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