' Action du Bouton "Ajouter"
Private Sub ButAjout_Click()
Dim Der As Integer, Cel As Range, Plage As Range, Ok As Boolean, i As Integer
Dim Lig As Long, LigP As Long, DLigP As Long
Dim sPays As String, sAnnee As String
sPays = Me.CobSelPays
sAnnee = Me.CombAnnee
With Sheets("Base")
' Trouver le pays via Find, plus rapide
LigP = .Range("A:A").Find(What:=sPays, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Row
If LigP = 2 Then LigP = 1 ' evite un bug
' Dernière ligne du ableau du pays
DLigP = .Range("A" & LigP).End(xlDown).Row
' Trouver l'année dans la colonne B de la plage
Lig = .Range("B" & LigP & ":B" & DLigP).Find(What:=sAnnee, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Row
If CobCollectionneur = "Julien" Then
If ListBox1 = "1c" Then Cells(Lig, 3) = "X"
If ListBox1 = "2c" Then Cells(Lig, 4) = "X"
If ListBox1 = "5c" Then Cells(Lig, 5) = "X"
If ListBox1 = "10c" Then Cells(Lig, 6) = "X"
If ListBox1 = "20c" Then Cells(Lig, 7) = "X"
If ListBox1 = "50c" Then Cells(Lig, 8) = "X"
If ListBox1 = "1€" Then Cells(Lig, 9) = "X"
If ListBox1 = "2€" Then Cells(Lig, 10) = "X"
If ListBox1 = "2€ Com." Then Cells(Lig, 11) = "X"
Else ' Si ce n'est pas julien, c'est forcément Brigitte :)
If ListBox1 = "1c" Then Cells(Lig, 13) = "X"
If ListBox1 = "2c" Then Cells(Lig, 14) = "X"
If ListBox1 = "5c" Then Cells(Lig, 15) = "X"
If ListBox1 = "10c" Then Cells(Lig, 16) = "X"
If ListBox1 = "20c" Then Cells(Lig, 17) = "X"
If ListBox1 = "50c" Then Cells(Lig, 18) = "X"
If ListBox1 = "1€" Then Cells(Lig, 19) = "X"
If ListBox1 = "2€" Then Cells(Lig, 20) = "X"
If ListBox1 = "2€ Com." Then Cells(Lig, 21) = "X"
End If
End With
Set ws = ThisWorkbook.Sheets("Acceuil")
ws.Select
Inilvw1
End Sub