LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Grouped option buttons on forms

This should be easy...how does one determine which of a set of grouped
option buttons is selected? Let's say I have 4 option buttons
(optionbutton1, optionbutton2, etc) with groupname set to Season. The
user selects....winter, which corresponds to optionbutton4. I can
check each one...

If Userform1.OptionButton1.Value = -1 Then x = 1
If Userform1.OptionButton2.Value = -1 Then x = 2
If Userform1.OptionButton3.Value = -1 Then x = 3
If Userform1.OptionButton4.Value = -1 Then x = 4

but there MUST be a better way!! I have many groups and many, many
option buttons on my form. The above solution quickly becomes
tedious.

Thanks,
John

 
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, Forms Control, Excel 2007 - 3 options Paula Excel Worksheet Functions 6 February 6th 09 07:36 PM
Option Buttons from the Forms Toolbar - Excel 2003 mickey Excel Worksheet Functions 2 October 14th 07 11:32 AM
Forms Option Buttons(Can be right mouse selected when sheet is loc Newbeetle Excel Discussion (Misc queries) 2 February 10th 07 04:12 PM
Option Buttons on User Forms ibeetb Excel Programming 1 October 30th 03 10:06 PM
Forms: Group Boxes and Option Buttons Kathryn[_4_] Excel Programming 2 October 17th 03 02:11 AM


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

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

About Us

"It's about Microsoft Excel"