VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Ever wanted to use those tickboxes that are used by list boxes, well this code will let you do that

by Steven Bailey (10 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 23rd April 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Ever wanted to use those tickboxes that are used by list boxes, well this code will let you do that, this code gets the items that you have

Rate Ever wanted to use those tickboxes that are used by list boxes, well this code will let you do that



'please obay these instructions:
'
' 1. Remember to keep the following code in a command button
' 2. Replace "list1" and "list2" with the appropriate controls
' 3. Make sure that the first list is ither set with "multiselect"
'    or the "checkbox" style.

Private Sub Command1_Click
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then
List2.AddItem List1.List(i)
End If
Next i
End Sub

Download this snippet    Add to My Saved Code

Ever wanted to use those tickboxes that are used by list boxes, well this code will let you do that Comments

No comments have been posted about Ever wanted to use those tickboxes that are used by list boxes, well this code will let you do that. Why not be the first to post a comment about Ever wanted to use those tickboxes that are used by list boxes, well this code will let you do that.

Post your comment

Subject:
Message:
0/1000 characters