Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Option Buttons
I am trying to write a code to disable an entire group of
option buttons... is there a command to diable a group? The idea is if one box is checked then group_1 (which consists of 8 option buttons) needs to be disabled -- I would rather not disable each button individually. --Keri |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Option Buttons
Hi Keri,
There is no command to disable a group, but you could use a for each loop. If you want to disable only certain option buttons I'd name them to include the group name and check the name e.g Sub test_Disable_OptionButtons() Dim opt As OptionButton ' Check each option button on frmtest For Each opt In frmtest.OptionButtons ' Check if button belongs to required group by checking name If InStr("GROUP1", opt.Name) Then ' If it does disable opt.Enabled = False End If Next opt End Sub HTH, Mark "Keri" wrote: I am trying to write a code to disable an entire group of option buttons... is there a command to diable a group? The idea is if one box is checked then group_1 (which consists of 8 option buttons) needs to be disabled -- I would rather not disable each button individually. --Keri |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Option Buttons/Radio Buttons | New Users to Excel | |||
option buttons | Excel Worksheet Functions | |||
Option Buttons | Excel Discussion (Misc queries) | |||
Option Buttons | Excel Programming | |||
Option Buttons | Excel Programming |