Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to select option button in option group
I need macro to select an option button when the workbook opens. The option
button is named "Optionbutton1" and the linked cell is named "typechoice". (Option button is part of an option group (of 3 buttons) called "type". Linked cells for the other two are 'typechoice2' and typechoice3') The linked cells are in a hidden column (unprotected cell) in a protected sheet. Please advise on the proper way to do this. -- cm |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to select option button in option group
Private Sub Workbook_Open()
Sheets("sheet1").OptionButton1 = True End Sub On Oct 20, 8:24*pm, cm wrote: I need macro to select an option button when the workbook opens. The option button is named "Optionbutton1" and the linked cell is named "typechoice".. (Option button is part of an option group (of 3 buttons) called "type". Linked cells for the other two are 'typechoice2' and typechoice3') The linked cells are in a hidden column (unprotected cell) in a protected sheet. Please advise on the proper way to do this. -- cm |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to select option button in option group
open the VBA editor (ALT+F11)
In the Project Explorer (Ctrl+R) right click on the icon for ThisWorkbook, select View Code and paste the following : Option Explicit Private Sub Workbook_Open() Worksheets("???").Range("TypeChoice") = 1 End Sub Please change ??? for the worksheet name. usually the first option will put a 1 in the linked cell. Just check that this is so. "cm" wrote: I need macro to select an option button when the workbook opens. The option button is named "Optionbutton1" and the linked cell is named "typechoice". (Option button is part of an option group (of 3 buttons) called "type". Linked cells for the other two are 'typechoice2' and typechoice3') The linked cells are in a hidden column (unprotected cell) in a protected sheet. Please advise on the proper way to do this. -- cm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I select an option button using code | Excel Programming | |||
need help on how to grey out one option button in one group box based on the selection of another option button in another group box | Excel Programming | |||
De-Select an Option button | Excel Programming | |||
Option buttons: How to get the selected option from a group? | Excel Programming | |||
Option button group name | Excel Programming |