ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA - Option Button (https://www.excelbanter.com/excel-programming/297241-vba-option-button.html)

ajliaks[_19_]

VBA - Option Button
 
Hi

I have option buttons called "one" and "two"

How can I made option button "one" be preselected by defect?

(when I run the macro, obtion button "one" must appear selected.

Thanks

--
Message posted from http://www.ExcelForum.com


Bob Kilmer[_2_]

VBA - Option Button
 
MacroName()
OptionButton1.Value = True
'more code,...
End Sub

'If the option button is in a form, use:

Private Sub UserForm_Initialize()
OptionButton1.Value = True
End Sub


"ajliaks " wrote in message
...
Hi

I have option buttons called "one" and "two"

How can I made option button "one" be preselected by defect?

(when I run the macro, obtion button "one" must appear selected.

Thanks.


---
Message posted from http://www.ExcelForum.com/






All times are GMT +1. The time now is 01:43 PM.

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