VB中同时有5个option控件如何使用

来源:百度知道 编辑:UC知道 时间:2024/06/28 02:46:13
刚才那个东西我放弃了,现在我想具体问下现在的问题:
我在第一个窗体里面的一个组里放置了5个option控件,然后想在第二个窗体里面根据这5个option控件,单击第二个窗体里面的一个cammond控件,输出不同的线条,应该怎么弄?用if嵌套结构可以实现吗?
在此感谢上次给出我答案的朋友!
小弟在线等!谢谢高手!
可以再完整一点吗?只有一个单击控件,根据5个option不同选择输出不同的线条,线条代码不写了,主要写单击控件cammond的代码,谢谢

if form1.opertion1.value then
msgbox "opertion1已经选中"
end if

Private Sub Command1_Click()
If Form1.opertion1.Value = True Then
'.................你的代码
ElseIf Form1.opertion2.Value = True Then
'..................
ElseIf Form1.opertion3.Value = True Then
'............................
ElseIf Form1.opertion4.Value = True Then
'................................
ElseIf Form1.opertion5.Value = True Then
'..............................
End If
End Sub

If Option1.Value = True Then 代码
If Option2.Value = True Then 代码
If Option3.Value = True Then 代码
If Option4.Value = True Then 代码
If Option5.Value = True Then 代码