Option Buttons

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

Patrick Simonds

I have 3 option buttons on my userform:

No Lunch, 30 Minutes, 60 Minutes

I do not seem to know how to group these 3 buttons together so that I can
set 30 minutes as the default and selecting one of the others will clear the
default.
 
You ou can give the three buttons the same GroupName (in the Properties
window) or you can place them all in a Frame control. This ensures that only
one member can be selected. Change the Value property of the default button
to True.
 
Hi,

You need to set the value of the button to true.
IE: Userform1.Optionbutton2.value = True
You can use this code when you init. the userform.
 
Thanks guys for the quick response.

Charles Harmon said:
Hi,

You need to set the value of the button to true.
IE: Userform1.Optionbutton2.value = True
You can use this code when you init. the userform.
 
Figured it out:

If OptionButton1.Value = True Then
rng(1, 12) = TimeSerial(0, 0, 0)

ElseIf OptionButton2.Value = True Then
rng(1, 12) = TimeSerial(0, 30, 0)

ElseIf OptionButton3.Value = True Then
rng(1, 12) = TimeSerial(0, 60, 0)
End If
 

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