Hi All,
I've been using the following code to conditionally format userform textboxes based on a specific value (in this case 2490):
Sub SetTextBoxA10(ByVal aBox As Integer)
With UserForm10.Controls("TextBox" & aBox)
If .Text <> "-" Then
If .Text <> "" Then
If .Text >= 2490 Then .BackColor = RGB(0, 255, 0)
If .Text >= 2490 Then .ForeColor = RGB(0, 0, 0)
If .Text < 2490 Then .BackColor = RGB(255, 0, 0)
If .Text < 2490 Then .ForeColor = RGB(0, 0, 0)
End If
End If
If .Text = "-" Or .Text = "" Then .BackColor = RGB(128, 128, 128)
If .Text = "-" Or .Text = "" Then .ForeColor = RGB(0, 0, 0)
End With
End Sub
What I'm looking to do now is amend this so rather than use a specific value, to use the value in a specific textbox on the same userform.
Can anyone help with this?
Thanks
Bookmarks