title: about option buttons in User form
body: <p>I have a question: </p>
  
  <p>I need to create a user form that contain that usual OK and Cancel Buttons. It also should contain two sets of Options buttons, each set placed inside a frame. The captions on the first set should be <strong>basketball, baseball, football</strong>, the captions on the second set should be <strong>watch on TV</strong> and <strong>Go to games</strong>.  I need to write the event handlers and code in a module so that when the program runs, the user sees the form.  If the user makes a couple of choices and clicks OK, he should see a message like "Your favorite sport is basketball, and you usually watch on TV." If the user clicks Cancel, the message "Sorry you don't want to play" should appear.</p>
  
  <p><img src="https://i.stack.imgur.com/MwZFD.jpg" alt="enter image description here"></p>
  
  <p>I think I almost have it working, but I don't know why I cannot successfully execute the Macro.</p>
  
  <p>My Code is :</p>
  
  <pre><code>Option Explicit
  
  Private Sub CommandButton2_Click()
  
  
  MsgBox ("sorry if you don't want to play")
  End Sub
  
  Private Sub commandbuttons_Click()
  Dim optbasket As String, optbaseball As String, optfootball As String
  Dim optwog As String, optgtg As String
  
   Select Case True
   Case optbasket
     optbasket = True
   Case optbaseball
     optbaseball = True
   Case optfootball
     optfootball = True
    End Select
  
  If optwog Then
    optwog = True
    Else
    optgtg = True
    End If
  
  btnok = MsgBox("you favorite sport is " &amp; Frame1.Value &amp; "you usually " &amp; Frame2.Value &amp; ",")
  End Sub
  
  Private Sub OptionButton1_Click()
  
  End Sub
  
  Private Sub btmcancel_Click()
  
  End Sub
  
  Private Sub btnok_Click()
  
  End Sub
  
  Private Sub Frame1_Click()
  
  End Sub
  
  Private Sub Frame2_Click()
  
  End Sub
  
  Private Sub optbaseball_Click()
  
  End Sub
  
  Private Sub optbasketball_Click()
  
  End Sub
  
  Private Sub optfootball_Click()
  
  End Sub
  </code></pre>
  
  <p>Thank you very much!!!</p>