vb中listbox复选框选择多个时如何只获取最后选择的内容?但其他也必须是勾选状态
2个回答
展开全部
Private Sub Command1_Click()
For i = List1.ListCount - 1 To 0 Step -1
if i=List1.ListCount - 1 and List1.Selected(i) = True then
strLIst=List1.Selected(i).value;
end if
If List1.Selected(i) = True and i<>List1.ListCount - 1 Then
Exit For
end if
Next
End Sub
For i = List1.ListCount - 1 To 0 Step -1
if i=List1.ListCount - 1 and List1.Selected(i) = True then
strLIst=List1.Selected(i).value;
end if
If List1.Selected(i) = True and i<>List1.ListCount - 1 Then
Exit For
end if
Next
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询