Listbox (or Combobox) Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wbw
    New Member
    • Mar 2008
    • 8

    Listbox (or Combobox) Problem

    I am trying to filter on rows with a selected value from a listbox and when I step through the ComboBox2 code, it jumps to the ComboBox3 code from the third line (.EntireRow.Hid den = True). This happens when I use comboboxes or listboxes. Why does it jump to ComboBox3_Chang e? I have seen this happen when I have code in more than one listbox/combobox on a worksheet.

    Private Sub ComboBox2_Chang e()
    With Range("A10:N296 ")
    .EntireRow.Hidd en = True **** JUMPS TO ComboBox3_Chang e CODE
    Range("A10:N296 ").EntireRow.Hi dden = True
    For Each cell In Range("B10:B296 ")
    Select Case cell.Value
    Case Is = Worksheets("she et1").Range("A1 6").Value
    cell.EntireRow. Hidden = False
    End Select
    Next cell
    End With
    End Sub

    Private Sub ComboBox3_Chang e()

    End Sub


    I have filtered this way, but it still jumps to the code in ComboBox3_Chang e. It appears to be in a loop and eventually returns to ComboBox2_Chang e.

    Private Sub ComboBox2_Chang e()
    Range("A10:N296 ").AdvancedFilt er Action:=xlFilte rInPlace, CriteriaRange:= _
    Sheets("Sheet1" ).Range("A15:A1 6"), Unique:=False
    End Sub

    Private Sub ComboBox3_Chang e()

    End Sub
Working...