BBBZBBBBBBBBBBB
Cccccccccccycccccc
DDDDDDDDDDDDDDD
The List box 2:?
A VB great god add QQ: 1024447356 or WeChat: lizhiyu0707 save lives!!!!!!
CodePudding user response:
Private Sub Command1_Click ()
'on the left list to the right list
For I=0 To List1. ListCount - 1
If List1. Selected (I)=True Then
A=a + 1
End the If
Next I
If a=0 Then
MsgBox "in the text box on the left, please select the project", and "message"
The Exit Sub
End the If
List2. AddItem List1. Text
'List1. RemoveItem List1. ListIndex' if you need to list items on the left, remove the annotation can
End Sub
Private Sub Command2_Click ()
'list on the right to the left list
For I=0 To List2. ListCount - 1
If List2. Selected (I)=True Then
A=a + 1
End the If
Next I
If a=0 Then
MsgBox "please select the project in the text box on the right", and "message"
The Exit Sub
End the If
'List1. AddItem List2. Text' if you need to add items to the list of the left can be removed comments
List2. RemoveItem List2. ListIndex
End Sub
Private Sub Form_Load ()
AA=Array (" aaaaaaaaa ", "BBBZBBBB", "CCCCCCCC", "DDDDDDDDD", "BBBBBBB", "cccyccc")
BB=UBound (AA)
For I=0 To BB
List1. AddItem AA (I)
Next I
End Sub
Very simple, modify the AA array data,
CodePudding user response:
I didn't understand what you mean...CodePudding user response: