Disappearing text

waggy30

New Member
Joined
Mar 2, 2002
Messages
46
On a UserForm I have two listboxes. the values in the second list box changes depending what is selected in the first listbox.
My problem is that the controlsource of the first list box (which the second list box depends on) seems to disappear immediately after the user has selected a value from it.
Even worse, when i return to the worksheet and attempt to enter a value that was in the rowsource of the first list box, that disappears as well. Any other value stays, just not those in its rowsource.
This is extremely annoying, and i've got no idea what the problem is.

My code for the second list box is:

Private Sub ListBox2_AfterUpdate()
If Range("MonthChoice") = "January" Then
ComboBox2.RowSource = "Jan"
ElseIf Range("MonthChoice") = "February" Then
ComboBox2.RowSource = "Feb"
ElseIf Range("MonthChoice") = "March" Then
ComboBox2.RowSource = "Mar"
ElseIf Range("MonthChoice") = "April" Then
ComboBox2.RowSource = "April"
ElseIf Range("MonthChoice") = "May" Then
ComboBox2.RowSource = "May"
ElseIf Range("MonthChoice") = "June" Then
ComboBox2.RowSource = "Jun"
ElseIf Range("MonthChoice") = "July" Then
ComboBox2.RowSource = "Jul"
ElseIf Range("MonthChoice") = "August" Then
ComboBox2.RowSource = "Aug"
ElseIf Range("MonthChoice") = "September" Then
ComboBox2.RowSource = "Sep"
ElseIf Range("MonthChoice") = "October" Then
ComboBox2.RowSource = "Oct"
ElseIf Range("MonthChoice") = "November" Then
ComboBox2.RowSource = "Nov"
ElseIf Range("MonthChoice") = "December" Then
ComboBox2.RowSource = "Dec"
End If
End Sub
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,375
Messages
6,171,736
Members
452,419
Latest member
mapa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top