Excel 如何确定在vba中是否选择了收音机框
如何确定是否在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
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