Dim b_1ere_selection As Boolean 'flag pour dire si la premiere selection a été faite Dim b_2eme_selection As Boolean 'flag pour dire si la seconde selection a été faite Dim selection1 As Long 'Index de la 1ere picturebox sélectionnée Dim selection2 As Long 'Index de la 2nde picturebox sélectionnée Private Sub Form_Load() selection1 = -1 selection2 = -1 b_1ere_selection = False b_2eme_selection = False For i = 0 To Picture1.Count - 1 Picture1(i).BackColor = vbWhite Next i End Sub Private Sub Picture1_Click(Index As Integer) If b_1ere_selection = False Then b_1ere_selection = True selection1 = Index Picture1(Index).BackColor = vbBlue Else If b_2eme_selection = False Then b_2eme_selection = True selection2 = Index Picture1(Index).BackColor = vbBlue MsgBox "1ere picture Box : " & selection1 & vbCrLf & "2nde picture Box : " & selection2 b_2eme_selection = False b_1ere_selection = False Picture1(selection1).BackColor = vbWhite Picture1(selection2).BackColor = vbWhite selection1 = -1 selection2 = -1 End If End If End Sub