saleemMSMS
Registered User.
- Local time
- Today, 12:16
- Joined
- Aug 12, 2009
- Messages
- 92
i wrote this code in the switchboard got focus event... but its not working...
whats wrong ? i just want to scan all the controls in the form and when they are labels, and when the labels' caption is "Exit", i want to show it in a different color..
what am i missing ?
Code:
Private Sub Form_GotFocus()
Dim lbl As label
For Each lbl In Controls("Label")
If lbl.Caption = "Exit" Then
lbl.ForeColor = 202
lbl.FontName = "Trebutchet MS"
End If
Next
End Sub
whats wrong ? i just want to scan all the controls in the form and when they are labels, and when the labels' caption is "Exit", i want to show it in a different color..
what am i missing ?