VB listbox 添加选项问题

2024-12-18 02:16:39
推荐回答(2个)
回答1:

x = List1.ListCount
For i = 0 To x
List2.AddItem List1.List(i)
Next

回答2:

思路是一样的 难道你不会改?
Private Sub Command1_Click()
For i = List1.ListCount - 1 To 0 Step -1
If List1.Selected(i) = True Then List1.RemoveItem i
Next
End Sub

Private Sub Form_Load()
For i = 1 To 10
List1.AddItem i
Next
End Sub