title: Building a string with For Next Loop value for a UserForm control name
body: <p>I'm trying to build the value</p>
  
  <pre><code>If UserForm1.p1OptionButton.Value = True
  </code></pre>
  
  <p>Where the 1 in p1OptionButton is the value of a For Next loop counter but I'm getting errors however I try and construct it. If I use</p>
  
  <pre><code>Dim iPart As Integer
  For iPart = 1 to 6
  If "UserForm1.p" &amp; iPart &amp; "OptionButton.Value" = True
  .... blah blah blah rest of the code
  Next iPart
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Runtime error 13 type mismatch. </p>
  </blockquote>
  
  <p>If I leave the " out from around the other parts of the string it doesn't work either.</p>
  
  <p>Thanks for your help.</p>