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.
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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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)
"Claud Balls" <Lion@trainer.com> wrote in message
news:u5YoocF$EHA.3368@TK2MSFTNGP10.phx.gbl...
> 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
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks