I have a self-assesment worksheet that has Yes/No radio buttons. What I want to do is make it so if they click the "No" radio button instead of "Yes" a message will pop up and tell them to explain how they are going to come into comliance. Any help would be greatly appreciated.![]()
Hi Data2link
Welcome to the forum
try...Private Sub OptionButton1_Click() If OptionButton1.Value Then MsgBox "Help" End Sub
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
Last edited by Data2link; 11-14-2011 at 03:08 PM.
hi Data2link
No new to quote back as its just clutter. can you post the workbook?
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
I wish I could post it but I can't- It's security related- I made a generic one though to show you what I'm looking for - I want a message to pop up if any of the NO buttons are clicked
Thanks again
Last edited by Data2link; 11-14-2011 at 05:09 PM.
OK Radio buttons always confusing - option button
the assign maro will be like
Sub OptionButton_No_() If Worksheets("Sheet1").Range("A2").Value = 2 Then MsgBox "Help" End Sub
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
Thanks for the code. For some reason when I add this macro, when I go in to assign it to the NO option button it's not there?
hmmm. it works for me
see attachment
Sub OptionButton_No_Two() If Worksheets("Sheet1").Range("A3").Value = 2 Then MsgBox "Help Two" Worksheets("Sheet1").Range("A3").Value = 1 End Sub Sub OptionButton_No_One() If Worksheets("Sheet1").Range("A2").Value = 2 Then MsgBox "Help One" Worksheets("Sheet1").Range("A2").Value = 1 End Sub
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks