'为何我选择Option1时却MsgBox我是选择Option2呢,太邪了.
Private Sub Command1_Click()
If Option1.Value = ture Then
MsgBox "选择1", 48, "提示"
Exit SubElseIf Option2.Value = ture Then
MsgBox "选择2", 48, "提示"
Exit Sub
End If
End Sub

解决方案 »

  1.   

    编译能通过?Option1.Value = ture 应该是Option1.Value = True,True不是Ture
      

  2.   

    Private Sub Command1_Click()
        If Option1.Value = True Then
            MsgBox "选择1", 48, "提示"
        Exit Sub
        
        ElseIf Option2.Value = True Then
            MsgBox "选择2", 48, "提示"
        Exit Sub
        End If
    End Sub
      

  3.   

    最好设置成变量强制申明:option explicit