vba option button selected code example Example: vba option button selected If OptionButton1.Value = True Then Range("D3").Value = 10