Private Sub ListBoxcp_Click()
'
Ligne = Me.ListBoxcp.ListIndex
Range("B11").Value = ListBoxcp.List(Ligne, 1) ' Nom
Range("E11").Value = ListBoxcp.List(Ligne, 2) ' Prénom
Range("D13").Value = ListBoxcp.List(Ligne, 3) ' Date d'entrée dans l'entreprise
Range("D15").Value = ListBoxcp.List(Ligne, 4) ' Date de la demande
Select Case ListBoxcp.List(Ligne, 5)
Case "CONGES PAYES"
Me.OptionButton1 = True
Case "RTT"
Me.OptionButton2 = True
Case "EVENEMENT FAMILIAL (à préciser et joindre justificatif)"
Me.OptionButton3 = True
Case "CONGES SANS SOLDE"
Me.OptionButton4 = True
Case "AUTRE"
Me.OptionButton5 = True
Range("C27").Value = ListBoxcp.List(Ligne, 6)
End Select
Range("C31").Value = ListBoxcp.List(Ligne, 7) ' Date de début
Range("C33").Value = ListBoxcp.List(Ligne, 8) ' Date de fin
Range("E33").Value = ListBoxcp.List(Ligne, 9) ' Nombre de jours
' ***************************************************************************
' Peut-être revoir cette partie et utliser les boutons radio *
' ---------------------------------------------------------- *
' Range("A44").Value = ListBoxcp.List(Ligne, 11) ' Choix du responsable *
' ***************************************************************************
Range("E44").Value = ListBoxcp.List(Ligne, 12) ' Nom cds
Range("H44").Value = ListBoxcp.List(Ligne, 13) ' Date cds
Range("E46").Value = ListBoxcp.List(Ligne, 14) ' Motif refus
If IsDate(ListBoxcp.List(Ligne, 15)) Then Range("F48").Value = Format(ListBoxcp.List(Ligne, 15), "dd/mm/yyyy") ' Du
If IsDate(ListBoxcp.List(Ligne, 16)) Then Range("H48").Value = Format(ListBoxcp.List(Ligne, 16), "dd/mm/yyyy") ' Au
Range("E50").Value = ListBoxcp.List(Ligne, 17) ' Signature cds
Range("A1").Select
End Sub