i have this kind of Code in vba on my userform
this part works fine But when i try to put the Code Below into my code then the label get Red
when Start userform and no data in Cell ("D5")
I have try to get this code into it for change the Color if ("D5") have the right Text ("Text")
but it aint work
Code:
Sub resetLabels()
If Sheets("Cup 128").Range("E5").Value <> False Then Label1.Caption = Sheets("Cup 128").Range("E5").Value
End Sub
this part works fine But when i try to put the Code Below into my code then the label get Red
when Start userform and no data in Cell ("D5")
I have try to get this code into it for change the Color if ("D5") have the right Text ("Text")
Code:
If Sheets("Cup 128").Range("D5").Text = "True" Then
Me.Label1.BackColor = vbRed
End If
but it aint work