Link to home
Start Free TrialLog in
Avatar of ahashash
ahashash

asked on

inrement combobox value or index based on another (both have same values)

hi
i have 2 comboboxes (dropdowns) both have same values cb1 & cb2 values are (john, kay, sara) ..
i need to have cb2 automatically have a plus one value of cb1 based on (cb1) selectedIndex change .

meaning once a user selects "John" from cb1, then automatically cb2 will not show john but the very next item which is "Kay". and so on.

i tried (on cb1's selected index changed )

if cb1.selectedIndex > 0 then
cb2.selectedIndex += cb1.selectedIndex +1
==========did not work===============

then tried

            For i = 0 To cb1.Items.Count - 1
                   lbltest5.Text = cb2.Items.Item(i)
            Next

but it adds the last value of cb1 to cb2 and nothing else.
any ideas would be much appreciated
thanks
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ahashash
ahashash

ASKER

many thank