Private Sub UserForm_Initialize()
Me.NumeroOrdre.RowSource = "Devise!D11:D" & Sheets("Devise").Cells(1, 1).End(xlDown).Row
DateSorti.Value = CDate(CSng(Date))
End Sub
Private Sub Quitte_Click()
'déclaration des variables :
Dim Trouve As Range, PlageDeRecherche As Range
Dim Valeur_Cherchee As String, AdresseTrouvee As String
Dim PlgLigne As Range
'********* à adapter ***********
'affectation de valeurs aux variables :
Valeur_Cherchee = NumeroOrdre
'dans la première colonne de la feuille active
Set PlageDeRecherche = ActiveSheet.Columns(4)
'*******************************
'méthode find, ici on cherche la valeur exacte (LookAt:=xlWhole)
Set Trouve = PlageDeRecherche.Cells.Find(what:=Valeur_Cherchee, LookAt:=xlWhole)
Set Me.commentaire = PlgLigne(2).Cells(ligne, 17)
Set PlgLigne = Trouve.EntireRow
PlgLigne(2).Cells(ligne, 13) = EvolutionCour.Value
PlgLigne(2).Cells(ligne, 10) = DateSorti.Value
PlgLigne(2).Cells(ligne, 11) = HeureSorti.Value
PlgLigne(2).Cells(ligne, 15) = Positif.Value
PlgLigne(2).Cells(ligne, 16) = Negatif.Value
Unload Me
End Sub