Change from a Form control to an ActiveX control. Same type that you used before (one of the insert options just like the form control). Label the new ActiveX control ComboBox1. Under the properties of ComboBox1 (right click on it while Design Mode is enabled to get to properties) you will see a ListFillRange. Put this there:
Right clicking on the ActiveX control will also give you a "View Code" option. Do that and put this code there. Disable Design Mode and change the name to see it work:
Private Sub ComboBox1_Change()
Dim ws As Worksheet: Set ws = Sheets("Data")
Dim lastrow As Long
Dim icell As Range
Application.ScreenUpdating = False
ws.Range("E7:E65000").EntireRow.Hidden = False
lastrow = ws.Range("E" & Rows.Count).End(xlUp).Row
For Each icell In ws.Range("E7:E" & lastrow)
If icell.Value = ComboBox1.Value Then
'do nothing
Else
icell.EntireRow.Hidden = True
End If
Next icell
Application.ScreenUpdating = True
End Sub
Bookmarks