Sub setColor(lbl As MSForms.Label, mlt As Long, vle As Long)
Dim ctrl As Object
For Each ctrl In Controls
If Left(ctrl.Name, 4) = "Page" Then
ctrl.BackColor = &H8000000F
End If
Next
Controls("MultiPage" & mlt).Value = vle
lbl.BackColor = &HFF00&
End Sub
'***** Page 1 *****
Private Sub Page1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page1, 1, 0)
End Sub
Private Sub Page1_1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page1_1, 2, 0)
End Sub
Private Sub Page1_2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page1_2, 2, 1)
End Sub
Private Sub Page1_1_1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page1_1_1, 3, 0)
End Sub
Private Sub Page1_1_2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page1_1_2, 3, 1)
End Sub
'***** Page 2 *****
Private Sub Page2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page2, 1, 1)
End Sub
Private Sub Page2_1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page2_1, 4, 0)
End Sub
Private Sub Page2_2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page2_2, 4, 1)
End Sub
Private Sub Page2_1_1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page2_1_1, 5, 0)
End Sub
Private Sub Page2_1_2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Call setColor(Page2_1_2, 5, 1)
End Sub