'这么改就好了
Private Sub Command1_Click()
Dim n As Integer
n = List1.ListCount - 1
For i = 0 To n
If List1.Selected(i) Then
q = MsgBox("您确定要将其设置为管理员吗?",vbYesNo + vbInformation,"提示")
If q = vbYes Then
List2.AddItem List1.List(i)
List2.Refresh
List1.Refresh
Else
Exit Sub
End If
End If
Next
End Su