VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Auto selection

by Prabir Das (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 15th November 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Auto selection

API Declarations


'programmed By:Prabir Das
'Email:[email protected]

Dim i, comp1, comp3 As Integer
Dim comp, comp2, litem As String

Rate Auto selection



List1.AddItem "Prabir"
List1.AddItem "Pronit"
List1.AddItem "Amit"
List1.AddItem "Shubhankar"
List1.AddItem "Abhijit"
List1.AddItem "Abhi"
List1.AddItem "Amitabh"
End Sub

Private Sub Text1_Change()

 comp = Text1.Text
 
 'comp1 = Len(Text1.Text)
    For i = 0 To List1.ListCount - 1
   
'comp1 = CInt(comp)

    
    'comp = Text1.Text
    
    litem = List1.List(i)
    
    comp2 = Left(litem, comp1)

        If comp = comp2 Then
            List1.Selected(i) = True
        End If
    Next
End Sub


Download this snippet    Add to My Saved Code

Auto selection Comments

No comments have been posted about Auto selection. Why not be the first to post a comment about Auto selection.

Post your comment

Subject:
Message:
0/1000 characters