title: Using VBA: Assign value to label control on userform
body: <p>I am working in the VBA code behind a userform. I have a string variable named block that corresponds to the name of a text label on my userform.  After looking at other questions it seems using the controls function gives the ability to control the settings of a label on the userform.  The block variable is a string of the labels name.I get an error at all attempts below</p>
  
  <pre><code> Me.Controls(block).BackColor = &amp;HFFFF&amp;
  </code></pre>
  
  <p>When I try to hard code it to make sure it is the exact name of the label I still get an error </p>
  
  <pre><code> Me.Controls("S111").BackColor = &amp;HFFFF&amp;
  </code></pre>
  
  <p>The following line DOES work:</p>
  
  <pre><code> Me.S111.BackColor = &amp;HFFFF&amp;
  </code></pre>
  
  <p>When I try a similar technique I get another error with:</p>
  
  <pre><code>Me.block.BackColor = &amp;HFFFF&amp;
  </code></pre>
  
  <p>What am I doing wrong and is what I am doing possible?</p>