Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
option buttons CAOU Excel Worksheet Functions 1 April 20th 06 09:17 AM
Option Buttons Grant90 Excel Discussion (Misc queries) 1 July 29th 05 02:34 PM
Option Buttons Alan Excel Programming 1 January 8th 04 05:55 PM
Option Buttons mudraker[_50_] Excel Programming 2 December 4th 03 01:44 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"