Private Sub Labelpad_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case Index And Button
Case Is = 0 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
Case Is = 1 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
Case Is = 2 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
Case Is = 3 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
End Select
End Sub
ok so i cut this peas out of the whole code to help u understand where's the problem
so we got 4 situation in all of them button variable has to be 2 but index variable is 0,1,2,3 which is the different labels i want them font changed when i left click on them ok?
but some how only the first two labels work properly but you know what happens to the second two labels?
the third one's index returns 0 and the 4th one returns 1
so it's like after label 1 and label 2
label 3 is label 1 and label 4 is label 2
label 5 is label 1 and label 6 is label 2 (i said that cause there's a lot of labels you know its not just 4 labels)
so whats happening here?
are control arrays not the right answer for bunch of labels?
(because it works using separate labels but I reached controls limit so i could use arrays if there is some way I could get passed this problem)
i hope u understand what is going on
Select Case Index And Button
Case Is = 0 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
Case Is = 1 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
Case Is = 2 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
Case Is = 3 And 2
labelpad(0).Caption = ""
labelpad(0).ForeColor = vbButtonText
labelpad(0).BackColor = vbButtonFace
End Select
End Sub
ok so i cut this peas out of the whole code to help u understand where's the problem
so we got 4 situation in all of them button variable has to be 2 but index variable is 0,1,2,3 which is the different labels i want them font changed when i left click on them ok?
but some how only the first two labels work properly but you know what happens to the second two labels?
the third one's index returns 0 and the 4th one returns 1
so it's like after label 1 and label 2
label 3 is label 1 and label 4 is label 2
label 5 is label 1 and label 6 is label 2 (i said that cause there's a lot of labels you know its not just 4 labels)
so whats happening here?
are control arrays not the right answer for bunch of labels?
(because it works using separate labels but I reached controls limit so i could use arrays if there is some way I could get passed this problem)
i hope u understand what is going on