![]() |
#7
|
||||
|
||||
![]()
You are still nowhere near the code that you referred to in your initial post
Code:
Private Sub ComboBox1_Change() Dim oneItem As Variant Dim FilteredItems() As String Dim NotFlag As Boolean Dim Pointer As Long, i As Long If DisableMyEvents Then Exit Sub If AbortOne Then AbortOne = False: Exit Sub If TypeName(FullList) Like "*()" Then ReDim FilteredItems(1 To UBound(FullList)) DisableMyEvents = True Pointer = 0 With Me.ComboBox1 Select Case FilterStyle Case xlBeginsWith: .Tag = LCase(.Text) & "*" Case xlContains: .Tag = "*" & LCase(.Text) & "*" Case xlDoesNotContain: .Tag = "*" & LCase(.Text) & "*": NotFlag = True Case xlEndsWith: .Tag = "*" & LCase(.Text) Case xlNoFilter: .Tag = "*" End Select For Each oneItem In FullList If (LCase(oneItem) Like .Tag) Xor NotFlag Then Pointer = Pointer + 1 FilteredItems(Pointer) = oneItem End If Next oneItem .List = FilteredItems .DropDown DisableMyEvents = False If Pointer = 1 Then .ListIndex = 0 End With End If End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trying to get number of para in Combobox | SMehta | Word VBA | 2 | 02-20-2021 07:15 AM |
How to autofilter by exact date? | LearnerExcel | Excel | 5 | 06-19-2018 03:30 PM |
Autofilter on two Date Columns | OTPM | Excel Programming | 3 | 04-29-2014 12:56 AM |
![]() |
Grasshopper | Excel | 3 | 02-14-2013 01:41 AM |
![]() |
coxjamd | Excel Programming | 2 | 01-17-2013 02:24 PM |