OK it has been a while since I have done this . . . . I actually used it to
change the color of the text on my command buttons. I modified it for what
you are looking for. I tried it and it works great . . . . . here it is
I created a new module and placed this function in it . . . .
'******************************************************
Function buttonForeColor(formName As String, btnName As String)
Dim C As Control, colorOn As Integer, colorOff As Integer
For Each C In Forms(formName)
colorOn = 128
colorOff = 13056
If TypeOf C Is Label Then
If C.Caption = "" Then 'Only look at buttons with text
GoTo myEnd
Else
If C.Name = btnName Then
With C
.ForeColor = colorOn
.SpecialEffect = 1
End With
Else
With C
.ForeColor = colorOff
.SpecialEffect = 0
End With
End If
End If
myEnd:
End If
Next C
End Function
'********************************************************
Then on the form on the labels On Mouse Move I put this code on the Event
Prodedure . . .
'********************************************************
Private Sub lblTest_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Call buttonForeColor("frm_main", "lblTest")
End Sub
'********************************************************
HTH,
Rodger