Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 如何确定在vba中是否选择了收音机框_Excel_Vba - Fatal编程技术网

Excel 如何确定在vba中是否选择了收音机框

Excel 如何确定在vba中是否选择了收音机框,excel,vba,Excel,Vba,如何确定是否在VBA中选择了收音机框 窗体控件 Set sht = ThisWorkbook.Sheets(1) If sht.OptionButton1.Value = 1 Then MsgBox "ok!" End If 未运行示例 sht.OptionButton1.Value=真或如果sht.OptionButton1.Value,则 Option Explicit Public Sub Example() If ThisWorkbook.Sheets(1).Optio

如何确定是否在VBA中选择了收音机框 窗体控件

Set sht = ThisWorkbook.Sheets(1)
If sht.OptionButton1.Value = 1 Then
  MsgBox "ok!"
End If
未运行

示例


sht.OptionButton1.Value=真或如果sht.OptionButton1.Value,则
Option Explicit

Public Sub Example()

    If ThisWorkbook.Sheets(1).OptionButtons("Option Button 1").Value > 0 Then
        MsgBox "Yes"
    Else
        MsgBox "No"
    End If

End Sub