+ Reply to Thread
Results 1 to 4 of 4

Forms, Radio buttons, GroupName value

  1. #1
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    Forms, Radio buttons, GroupName value

    I have a group of radio buttons and I want some code to work out what has been selected.

    I could set up an array and a For i = 1 to x to find the correct one but I was wondering if there was an easier command to find the correct value...

    Is there a way to spit out the value that is "True" from a Group Name?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Forms, Radio buttons, GroupName value

    Why not loop through all the buttons in the group?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Forms, Radio buttons, GroupName value

    I was planning on doing that, but i just wondered if it was a waste of coding if there is just some simple...

    Dim x as string

    x = Commands.Group("Section").Value

    Commands(x).Value

    if you can kinda understand what im doing there..., would obviously save space and time

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Forms, Radio buttons, GroupName value

    I don't think there's way to do that.

    Mind you it is a bit unclear what you have.

    You mention a GroupName, but Forms option buttons don't have such a property.

    Do you mean a group box that you've put a set of option buttons in?

    If you do then you can set the same Linked cell for all the option buttons in the group box and it will reflect which is chosen.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1