View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default option button-if else?

Is it on a userform? If so, then

If Me.OptionButton1.Value Then
sOne = "Horse"
Else
sOne = "Pig"
End If

--

HTH

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


"Alen32" wrote in message
lkaboutsoftware.com...
I wamt to make third option button where is possible to choose both horse
and pig. Whta I need to change in my code?

If .OptionButton1 Then
sOne = "Horse"
Else
sOne = "Pig"