Results 1 to 12 of 12

Thread: [RESOLVED] Radio ComboBox Group (Changing value on one combo affects others)

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    25

    Resolved [RESOLVED] Radio ComboBox Group (Changing value on one combo affects others)

    Hey all,

    I have a rather strange request, or well... I am requesting something that could possibly have an alternative solution.

    I have 3 ComboBoxes all with the same data, and each ComboBox has 3 elements. Suppose, for example, the 3 elements are "APPLES", "ORANGES", "BANANAS".

    So what I am seeking to do is to take the Click() event from the ComboBoxes (note that these are in a Control array) and use it so that when one ComboBox needs to change its value, all other ComboBox'es will not contain that same selected text.

    If the first combobox's text = APPLES, the second = ORANGES, and the third = BANANAS;
    When I manually change the third combobox's text to be APPLES, I want the first combobox's text to change to be whatever option was not selected (in this case it'd be BANANAS)
    Does this make sense?

    Anyways, I am having difficulty with this algorithm, which is mainly what I am seeking.
    Current I know how to detect which combobox needs to change, I just don't know how to get the correct value to change it to:
    Code:
    Private Sub ComboBoxes_Click(Index As Integer)
        Dim idx As Integer
        For idx = 0 To 2
            If ComboBoxes(idx).ListIndex = ComboBoxes(Index).ListIndex Then 'If there is a combobox that is currently using the newly selected index...
                'ComboBoxes(idx).ListIndex = newIndex  '<-- What is the value of newIndex?
                Exit For
            End If
        Next
    End
    PS: It's a good idea to know that whenever you programmatically change the ListIndex of a combo, the Click() event is triggered.

    I appreciate all the help you can give.

    Thanks and God Bless!
    -Nick


    View Solution
    Last edited by Millerni456; Mar 1st, 2013 at 01:16 PM.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width