Arie Bos
Board Regular
- Joined
- Mar 25, 2016
- Messages
- 224
- Office Version
- 365
- Platform
- Windows
I want to show a value from the previous user form into the next one. The number should show up in gray. As soon as the use changes the gray value, I'd like it to change to black again. THe following does read the previous value but the value does not change color. I tried this with both IF and CASE, but that is not the reason it does not work, I think.
VBA Code:
'make defult text grey as long as not changed by user
Private Sub txtNew_OpsDays_SSD_Change()
If txtNew_OpsDays_SSD.Value = txtExising_OpsDays_SSD.Value Then
Me.txtNew_OpsDays_SSD.BackColor = RGB(124, 124, 124)
Else
Me.txtNew_OpsDays_SSD.BackColor = RGB(255, 255, 255)
End If
End Sub