reginazhao
New Member
- Joined
- Aug 28, 2020
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
I create a couple of text boxes in several graph. The text box like "(4%) sales plan", the number (4%) refers to another cell. How to write VBA to make the negative number as Red front text, and positive number as Black front text.
I tried this:
Private Sub TextBox1_Change()
If TextBox1.Value < "0%" Then
TextBox1.ForeColor = vbRed
End If
End Sub
but not working. TIA
I tried this:
Private Sub TextBox1_Change()
If TextBox1.Value < "0%" Then
TextBox1.ForeColor = vbRed
End If
End Sub
but not working. TIA