I have a sub with this code:
Sub ColorLabel()
Dim ctlCurrentControl As Control
Dim lngYellow As Long
lngYellow = RGB(255, 255, 0)
Set ctlCurrentControl = Screen.ActiveControl
With ctlCurrentControl.???
.BackColor = lngYellow
End With
End Sub
I want to run this code On Enter of a text box. Basically, I want to
color the label of the active text box. I am calling the procedure on
enter and will call another sub to restore the default formatting of
the label once the text box loses focus.
I have found how to reference a text box using a label's parent
property but I want to reference the label attached to the active text
box but don't know which property to reference (thus the question
marks above). Can anyone tell me how this is done or if it's even
possible?
Thanks in advance.
Troy Lee