我用的listview解决了,但是又有新的问题了, For i = 1 To ListView1.ListItems.Count If ListView1.ListItems(i).Checked Then Label1.Caption = Label1.Caption + ListView1.ListItems(i).Text + vbCrLf End If Next i 这样能得到选中的第一列的值,那如何能得到选中行的第二列或其他列的值呢
Label1.Caption = "" For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then Label1.Caption = Label1.Caption & " " & List1.List(i) End If Next只要选中 Label1中就会出现
For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems(i).Checked Then
Label1.Caption = Label1.Caption + ListView1.ListItems(i).Text + vbCrLf
End If
Next i
这样能得到选中的第一列的值,那如何能得到选中行的第二列或其他列的值呢
然后在程序中通过判断标题列是否有勾来选择输出
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then
Label1.Caption = Label1.Caption & " " & List1.List(i)
End If
Next只要选中
Label1中就会出现