vb复选框如何把选中的都让一个文本框显示出来呢?

vb复选框有n的选项,我想把所有选中的选项的名字都让一个文本框显示出来呢?

第1个回答  2009-03-18
Private Sub Command1_Click()
Dim i As Integer
Text1.Text = ""
For i = 0 To Check1.Count - 1
If Check1(i).Value = 1 Then Text1.Text = Text1.Text & Check1(i).Caption & vbCrLf
Next
End Sub本回答被提问者采纳
第2个回答  2009-03-18
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.Text = Text1.Text & " " & Check1.Caption

End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Text1.Text = Text1.Text & " " & Check2.Caption
End If

End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Text1.Text = Text1.Text & " " & Check3.Caption
End If
End Sub

是不是这样子啊
相似回答