Results 1 to 4 of 4
  • Thread Tools
  1. Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Polling Option Buttons (97, 2000)

    What is the proper way to poll a group of option buttons on a custom userform, given that they are identified by a common GroupName ??

    I want to put this into the form's OK-button click event.

    Tks,
    ~~~Paul

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Polling Option Buttons (97, 2000)

    Can you define what you mean by "poll a group of option buttons ?"
    Legare Coleman

  4. Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Polling Option Buttons (97, 2000)

    Maybe 'polling' them isn't the right word...
    Basically, what's the best way to tell which option button was selected out of the group?

    ~~~Paul

  5. WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    10,931
    Thanks
    11
    Thanked 279 Times in 273 Posts

    Re: Polling Option Buttons (97, 2000)

    You can loop through them and see which one has a true value.

    You might add a code to the click event of each one to do something or set something when an option is clicked.

    Or you have code to do something based on which one is pressed:

    if optionbutton1.value then
    'do something
    elseif optionbutton2.value then
    'do something else
    'add others as needed
    endif

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •