Quick option button question

MWhiteDesigns

Well-known Member
Joined
Nov 17, 2010
Messages
646
Office Version
  1. 2016
Platform
  1. Windows
I have an option button where its a yes or no question. If its not answered a msgbox appears. I have other check boxes and whatnot that write the value in a specific cell which is easy. But i cant determine how to write which ever option button is picked to a specific cell.

I need the a msgbox to appear if no button has been selected. Once the button is selected, i need it to go to a specific cell. Lets say (29,3).

Code:
If Me.YesOptionButton.Value = False Then
If Me.NoOptionButton.Value = False Then
MsgBox "Must Specify if attrition has been completed in HR for managers", , "HR for Managers"
Exit Sub
End If



Before there was the msgbox it showed as the below and worked fine.
Code:
If Me.YesOptionButton.Value = True Then
.Cells(29, 3) = "Yes"
End If
If Me.NoOptionButton.Value = True Then
.Cells(29, 3) = "No"
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,598
Messages
6,179,822
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top