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
.NET ProgrammingVisual Basic ClassicEditors IDEs

Avatar of undefined
Last Comment
ahashash

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rgonzo1971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
ElrondCT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ahashash

ASKER
many thank
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23