[B][COLOR=green]' **************[/COLOR][/B]
[B][COLOR=green]' Sub MODIFIEE *[/COLOR][/B]
[B][COLOR=green]' **************[/COLOR][/B]
Public Sub AjouterCavalierGalop(NomCavalier As String, Galop As Integer)
Dim c As Range
[COLOR=green][B]' Verifier si le fichier est ouvert[/B][/COLOR]
If Not FichierCavalierOuvert Then Exit Sub
[B][COLOR=teal][COLOR=green]' Recherche le cavalier dans la feuille cavalier du classeur formcavaliercheval.xls[/COLOR][/COLOR][/B]
With Workbooks("formcavaliercheval.xls").Sheets("Cavaliers")
[B][COLOR=blue] For Each c In .[A2].Resize(.Range("A" & .Rows.Count).End(xlUp).Row)[/COLOR][/B]
[B][COLOR=blue] If c.Value = NomCavalier Or c.Value = "" Then[/COLOR][/B]
[B][COLOR=blue] c.Value = NomCavalier[/COLOR][/B]
[B][COLOR=blue] c.Offset(, 1) = Galop[/COLOR][/B]
[B][COLOR=blue] Exit For[/COLOR][/B]
[B][COLOR=blue] End If[/COLOR][/B]
[B][COLOR=blue] Next[/COLOR][/B]
End With
End Sub