title: Dynamically Setting userform Label ForeColor
body: <p>I have a userform display that is Dynamic and updates itself as I enter in information on a separate worksheet.</p>
  <p><a href="https://i.stack.imgur.com/riKlx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/riKlx.jpg" alt="Powermeet Display" /></a></p>
  <p>What I would like it to do, is set forecolor to red for any negative values that occur under the Deadlift section.  I have tried using this code and a few others, but, so far, I do not get errors, nor do I get the font to change color</p>
  <pre><code>Sub updateForm2()
  
  Dim lLoop As Long
  For lLoop = 163 To 312
  
  If myForm.Controls(&quot;Label&quot; &amp; lLoop).Value &lt; 0 Then
      myForm.Controls(&quot;Label&quot; &amp; lLoop).ForeColor = RGB(255, 0, 0)
  Else
    myForm.Controls(&quot;Label&quot; &amp; lLoop).ForeColor = RGB(0, 0, 0) 
  End If
  
  Next
  
  End Sub
  </code></pre>
  <p>I have an updateForm, that dynamically updates all the labels as positions change based on the amount lifted</p>
  <pre><code>Sub updateForm()
  Dim wks As Worksheet
  Set wks = Sheets(&quot;DeadGenerator&quot;)
  
  'Update label values here
  myForm.Label1.Caption = wks.Range(&quot;c4&quot;).Text
  myForm.Label2.Caption = wks.Range(&quot;c5&quot;).Text
  </code></pre>
  <p>to</p>
  <pre><code>myForm.Label162.Caption = wks.Range(&quot;f41&quot;).Text
  </code></pre>
  <p>Then labels</p>
  <pre><code>myForm.Label163.Caption = wks.Range(&quot;g12&quot;).Value
  </code></pre>
  <p>to</p>
  <pre><code>myForm.Label312.Caption = wks.Range(&quot;k41&quot;).Value
  </code></pre>
  <p>are the labels that correspond to the 5 columns under the Deadlift Heading</p>
  <p>Any help is appreciated, I am still very new to using Userforms</p>
  <p>Thanks</p>