Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ed ed is offline
external usenet poster
 
Posts: 59
Default Grouping OptionButtons post-creation

Anyone have any suggestions for how to group option
buttons after I've created/coded them? For example, I
need to group six new option buttons so that when any one
of them is selected, neither of my two other
optionbuttons (in a different group) are deselected?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Grouping OptionButtons post-creation

Hi Ed,

Are these OptionButtons on a worksheet? If so, you could do something like
this:

Sub GroupOpts()
Dim n As Integer

For n = 1 To 5
With Sheet1.OLEObjects("OptionButton" _
& CStr(n)).Object
If n <= 3 Then
.GroupName = "grp1"
Else
.GroupName = "grp2"
End If
End With
Next n
End Sub

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Ed wrote:
Anyone have any suggestions for how to group option
buttons after I've created/coded them? For example, I
need to group six new option buttons so that when any one
of them is selected, neither of my two other
optionbuttons (in a different group) are deselected?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Grouping OptionButtons post-creation

Ed,

Are they ActiveX Toolbox control?

If, so, get the Control Toolbox toolbar up, and go to design mode (the blue
triangle icon to the left). Then select the optionbutton. Click the
properties icon, the hand pointing to a document next the design icon, and
there is a GroupName property that you can change.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ed" wrote in message
...
Anyone have any suggestions for how to group option
buttons after I've created/coded them? For example, I
need to group six new option buttons so that when any one
of them is selected, neither of my two other
optionbuttons (in a different group) are deselected?



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
UserForm OptionButtons Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 4th 07 07:52 PM
Moving OptionButtons MarkyB Excel Discussion (Misc queries) 2 March 7th 06 02:50 PM
OptionButtons Paul Excel Programming 4 December 4th 03 04:12 PM
Add OptionButtons in Excel Andrew Lenczycki Excel Programming 0 July 30th 03 02:34 PM
optionbuttons Phil Perry Excel Programming 1 July 10th 03 09:13 PM


All times are GMT +1. The time now is 05:58 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"