Private Sub ButtonValider_Click() 'validation
I = InStr(CbNomPrenom, ";")
If I = 0 Or Trim(CbNomPrenom) = "" Then
MsgBox "(Nom;Prénom) est incomplet !?" & vbLf & "ou il manque le séparateur " & Separateur, vbExclamation, ""
Exit Sub
End If
If MsgBox("Confirmez l'enregistrement de cette ligne ?", vbYesNo + vbQuestion, "ENREGISTRER") <> vbYes Then Exit Sub
'sauvegarde sur feuille
Nom = Trim(Left(CbNomPrenom, I - 1))
Prenom = Trim(Mid(CbNomPrenom, I + 1))
With ActiveSheet
Lig = .Columns("A:A").Rows(Rows.Count).End(xlUp).Row + 1
.Cells(Lig, 1).Value = Nom: .Cells(Lig, 1).HorizontalAlignment = xlCenter
.Cells(Lig, 2).Value = Prenom: .Cells(Lig, 2).HorizontalAlignment = xlCenter
For I = 1 To NbrDeTextBox
.Cells(Lig, I + 2).Value = Controls("Textbox" & I).Value '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
.Cells(Lig, I + 2).HorizontalAlignment = xlRight
Next
.Cells(Lig, 1).Select
End With
'reinit les boutons
ButtonValider.Enabled = True 'non car existe maintenant
ButtonModifier.Enabled = True 'oui car re-modif possible
'provoque la recharge de la liste NomPrenom
Dim SvgM$, SvgN$
SvgM$ = CbMois: SvgN$ = CbNomPrenom
CbMois = "": CbMois = SvgM$
CbNomPrenom = "": CbNomPrenom = SvgN$
Me.CbMois.SetFocus
End Sub