View Single Post
 
Old 02-23-2021, 05:24 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
If you want help here and insist on blazing a new trail from one that obviously works, post a sample document that contains the userform and code you are having problems with. And tell us WHICH LINE of code is causing your issue.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote