Private Sub CLsM_Change(ByVal Complet As Boolean, ByVal NbrLgn As Long)
If NbrLgn = 1 Then Exit Sub
LCouM = 0: CBnValider.Caption = "Ajouter": CBnSupprimer.Enabled = False
ReDim TVLM(1 To 1, 1 To CLsM.Colonnes.Count)
End Sub
Private Sub CLsM_BingoUn(ByVal Ligne As Long)
LCouM = Ligne: CBnValider.Caption = "Modifier": CBnSupprimer.Enabled = True
TVLM = CLsM.Lignes(LCouM).Range.Value
CAsM.ValeursDepuis TVLM
End Sub
Private Sub CBnValider_Click()
CAsM.ValeursVers TVLM
If LCouM = 0 Then
CLsM.ValeursVers TVLM
CLsM.Lignes.Add.Range.Value = TVLM
CLsM.Actualiser
Else
CLsM.Lignes(LCouM).Range.Value = TVLM
End If
End Sub
Private Sub CBnSupprimer_Click()
If LCouM = 0 Then Exit Sub
If MsgBox("Êtes-vous sûr de vouloir supprimer ça ?", vbYesNo + vbDefaultButton2, Me.Caption) = vbNo Then Exit Sub
CLsM.Lignes(LCouM).Delete
CLsM.Actualiser
End Sub