VB怎么把List复选框选中的内容复制到剪贴板?
1个回答
展开全部
'假设ListBox名为List1,单击Command1复制
Private Sub Command1_Click()
Dim I As Long, O As String
For I = 0 To List1.ListCount - 1
If List1.Selected(I) Then
O = O + List1.List(I) + vbCrLf
End If
Next
Clipboard.Clear
Clipboard.SetText O
End Sub
Private Sub Command1_Click()
Dim I As Long, O As String
For I = 0 To List1.ListCount - 1
If List1.Selected(I) Then
O = O + List1.List(I) + vbCrLf
End If
Next
Clipboard.Clear
Clipboard.SetText O
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询