title: How to force a user to select an option, using frames, excel userform
body: <p><img src="https://i.stack.imgur.com/xwWIH.png" alt="enter image description here">I have 4 frames on my userform. </p>
  
  <p>Frames 1, 2, and 4 have two option buttons. 
  Frame 3 has 5 options buttons. </p>
  
  <p>What I want to do, is that when the command button is selected, that if an option button in a frame has not been selected, a message will appear. </p>
  
  <p><strong>I would like to have a custom message for each frame.</strong> </p>
  
  <p>I have made a start, but really struggling to get to grips with the different frames... can someone point me in the right direction? (Still very beginner and trying to learn, so if all replies could be dumbed-down, that would be great!! :D )</p>
  
  <p>(I have pulled this code from an example, so it might not be the best approach to my problem...)</p>
  
  <pre><code>Dim ThisControl As Control
  
  For Each ThisControl In UserForm2.Frame1.Controls
  
  If TypeName(ThisControl) = "OptionButton" And _
  ThisControl.Value = True Then
  Unload Me
  End If
  
  Next ThisControl
  MsgBox "Please Select an Option", vbCritical, "Select Opton"
  </code></pre>