I have two OptionButtons and two ListBoxes. When I click on OptionButton2, ListBox1 goes away and ListBox2 becomes visible and enabled. When I click OptionButton1, ListBox2 goes away and ListBox1 becomes visible and enabled and I set the ListIndex of ListBox1 to 0.
When I click in ListBox1, some other code is supposed to make a ComboBox visible and populate it if the user chooses a certain item in the ListBox or take the ComboBox away if they choose something else in the ListBox:
Here's what happens when I change from OptionButton1 to OptionButton2. I start with:
1.ListBox1 works
2.I click OptionButton2
3.ListBox1 goes away and ListBox2 appears
4.ListBox2 works
5.I click OptionButton1
6.ListBox2 goes away and ListBox1 appears
7.ListBox1 doesn't work
8.I click OptionButton2
9.ListBox1 goes away and ListBox2 appears
10.Now ListBox2 doesn't work (I originally thought it was just a problem with ListBox1, but it was a problem with both)
11.I click OptionButton1 and ListBoxes change again
12.we're back to step 1, with ListBox1 working again.
I even used message boxes to help me see what was happening and this is what I found:
1.Clicked on OptionButton2 (with ListBox1 working) - ListBox1 lost focus and OptionButton2 got focus
2.Clicked on OptionButton1 - OptionButton2 lost focus and OptionButton1 got it
3.Clicked on ListBox1 - OptionButton1 lost focus, but ListBox1 didn't get it
4.Clicked on OptionButton2 - OptionButton2 got focus, but nothing lost it (that I know of)
I'm running out of fingernails and hair. Does anyone have any suggestions on correcting the problem with my ListBoxes?
Thank you so much.
Bookmarks