I want to copy the selected items from listbox1 to listbox2.
I know how to copy all the items but not selected.
Private Sub Command3_Click()
For i = 1 To List1.ListCount
List2.AddItem i
Next
End Sub
Above Code will copy all the items,But I want to copy selected items.
mansi sharma
7
Junior Poster in Training
Recommended Answers
Jump to Postyou want to copy selected only, this will answer your question:
Private Sub Command3_Click() List2.AddItem (List1.ListIndex) End Sub
hope this helps...
All 4 Replies
Jx_Man
987
Nearly a Senior Poster
Featured Poster
mansi sharma
7
Junior Poster in Training
selvaganapathy
31
Posting Pro
choudhuryshouvi
33
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.