在vb窗口中加入command1,option1,text1
然后将以下代码写入代码窗。
Private Sub Command1_Click()
If Option1.Value = True Then
Text1.Text = "这里有内容啦!"
Option1.Enabled = False
Else
MsgBox "单选框没有选中!"
End If
End Sub
Private Sub Form_Load()
Command1.Caption = "确定"
Option1.Caption = "单选框"
Text1.Text = ""
Option1.Value = False
End Sub
温馨提示:答案为网友推荐,仅供参考