OptionButton value

  • Thread starter Thread starter Patrick Simonds
  • Start date Start date
P

Patrick Simonds

I have a group of 3 OptionButtons ( No Lunch, 30 Minutes, 60 Minutes), What
I need is, if Cell 6 of the current row (rng(1, 6) ) is blank then No Lunch
is set, or if 30 then 30 Minutes is set or if it is 60 well you get the
point.
 
Private Sub CommandButton1_Click()
If ActiveSheet.Range("A6") = "" Then
OptNoL.Value = True
ElseIf ActiveSheet.Range("A6") = 30 Then
opt30L.Value = True
ElseIf ActiveSheet.Range("A6") = 60 Then
opt60l.Value = True
End If
End Sub
 
You could take another approach, link all 3 buttons to the same cell, say
A1, and add this formula to A1

=IF(F1="",1,IF(F1=30,2,IF(F1=60,3)))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top