Re : Problème d’affichage =ge (UNSERFORM)
Bonsoir,
Merci à Robert pour son aide d’hier soir.
Cependant il y a un petit souci dans l’affichage des données, après avoir actionné le bouton « MODIFIER »
De mon userform_eleve
1°) il m’affiche une seule donnée sur 15, et c’est la dernier qui s’affiche dans le texte 2 (deuxieme ligne de ma BD_eleve.)
2°) De plus après correction, je valide ma fiche. Mais au lieu d’apporter la ou les corrections, il y a création d’une nouvelle ligne.
J’avais construit ma procédure de la façon suivante
Private Sub CommandButton_modifier_Click()
If Label_ligne.Caption = "LIGNE" Then 'Si enregistrement
ligne_insertion = Sheets("BD_eleve").Range("A65000").End(xlUp).Row + 1
Else 'Si modification
ligne_insertion = Label_ligne.Caption
End If
Dim li As Integer
li = Sheets("BD_Eleve").Cells(Application.Rows.Count, 1).End(xlUp).Row
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 1)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 2)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 3)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 4)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 5)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 6)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 7)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 8)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 9)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 10)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 11)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 12)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 13)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 14)
TextBox_code.Value = Sheets("BD_Eleve").Cells(li, 15)
End Sub
3°) quelle est la procédure à mettre en place afin de pouvoir établir une nouvelle fiche tout en gardant l'userform ouvert, après avoir ovoir enregistrer une fiche précedement.
Si vous pouvez de nouveau m’aide,ça serait très bien.
Merci de vous patience et de votre aide
M.D