VB如何将list1的内容添加到list2

2025-01-08 08:44:46
推荐回答(2个)
回答1:

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

回答2:

dim i
for i=0 to list1.listcount-1
if list1.select(i)=true then list2.additem list1.list(i)
next