CodeItBetter Programming Another VB Programming Blog

How to change the background color of each of your TextBox controls to yellow when it receives the input focus and restore its background color to white when the user clicks on another field

Posted on January 4, 2009
1
2
3
4
5
6
7
8
'Controls - How to change the background color of each of your TextBox controls to yellow when it receives the input focus and restore its background color to white when the user clicks on another field
Private Sub Text1_GotFocus(index As Integer)
    Text1(index).BackColor = vbYellow
End Sub
 
Private Sub Text1_LostFocus(index As Integer)
    Text1(index).BackColor = vbWhite
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.