VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Type a string into a textbox to move any items in a listbox whose first letters match the letters i

by Neil Moore (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 13th December 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Type a string into a textbox to move any items in a listbox whose first letters match the letters in the textbox into a new listbox. CASE is

Rate Type a string into a textbox to move any items in a listbox whose first letters match the letters i



List2.Clear
Dim Step, TextLen As Integer
Dim TempText, TempList As String
TextLen = Len(Text1)
Step = 0
If TextLen = 0 Then
Else
Do While Step <= List1.ListCount - 1
TempText = UCase(Text1.Text)
TempList = UCase(List1.List(Step))
If Left(TempText, TextLen) = Left(TempList, TextLen) Then
List2.AddItem List1.List(Step)
Step = Step + 1
Else
Step = Step + 1
End If
Loop
End If
End Sub

Download this snippet    Add to My Saved Code

Type a string into a textbox to move any items in a listbox whose first letters match the letters i Comments

No comments have been posted about Type a string into a textbox to move any items in a listbox whose first letters match the letters i. Why not be the first to post a comment about Type a string into a textbox to move any items in a listbox whose first letters match the letters i.

Post your comment

Subject:
Message:
0/1000 characters