VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



How to Quickly Search a List Box. Without using API Calls

by vijay kumar (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 23rd September 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

How to Quickly Search a List Box. Without using API Calls

Rate How to Quickly Search a List Box. Without using API Calls



    List1.AddItem "vijay"
    List1.AddItem "kumar"
    List1.AddItem "viju"
    List1.AddItem "mahi"
    List1.AddItem "mahesher"
    List1.AddItem "ravi"
    List1.AddItem "varma"
    Text1.Width = List1.Width
    List1.Visible = False
End Sub

Private Sub Text1_Change()
List1.Visible = True
    For intItem = 0 To List1.ListCount - 1
        If LCase(Text1.Text) = Left(LCase(List1.List(intItem)), Len(LCase(Text1.Text))) Then
            List1.ListIndex = intItem
            Exit For
        End If
    Next
End Sub


Download this snippet    Add to My Saved Code

How to Quickly Search a List Box. Without using API Calls Comments

No comments have been posted about How to Quickly Search a List Box. Without using API Calls. Why not be the first to post a comment about How to Quickly Search a List Box. Without using API Calls.

Post your comment

Subject:
Message:
0/1000 characters