Hi. I would like to ask for you guys help. I'm a begginer in VBA but I was asked at work to develop a VBA app and I need to finish it asap. I'm trying to learn as fast as I can but all the advanced stuff I've been searching online and writting "dirty code". I don't know exactly what I'm doing but it's working so far. I'm stuck with the following matter. The code below works like a charm.


Private Sub Label3_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

Label3.ForeColor = vbWhite
Label3.SpecialEffect = 1
Label3.BackStyle = 1
Label3.BackColor = &H808000

End Sub

Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

Label3.ForeColor = vbBlack
Label3.SpecialEffect = 0
Label3.BackStyle = 0

End Sub

My problem is that I need the same piece of code for other 500 Labels in the same userform. I know that it's possible to do it without writting the code for each label separately, but I had no success in the past 2 days. Would you guys help me find a solution? I tried to work with class modules and variables, but it's too advanced for me, I need a Light.

Thank you!