Re : Problème pour Modifier donnée via un Userform
Bonjour,
Modifie ton code
1) ajoute les deux dernières lignes dans cette procédure
Private Sub CommandButton2_Click()
Dim Lig As Long
' Stop
If OptionButton2 = True Then
Index = ListBox1.ListIndex + 4
With Sheets("BRACELET")
.Cells(Index, 1).Value = TextBox11 ' REF
.Cells(Index, 2).Value = TextBox12 ' DESIGNATION
.Cells(Index, 3).Value = TextBox13 ' PA HT
.Cells(Index, 4).Value = TextBox14 ''''''''''''''''''' EFFACE FORMULE PA TTC
.Cells(Index, 5).Value = TextBox15 ' PV TTC
.Cells(Index, 6).Value = TextBox16 ''''''''''''''''''' EFFACE FORMULE MARGE
.Cells(Index, 7).Value = TextBox17 ' ENTREE
.Cells(Index, 8).Value = TextBox18 ' SORTIE
.Cells(Index, 9).Value = TextBox19 ''''''''''''''''''' EFFACE FORMULE STOCK
.Cells(Index, 10).Value = TextBox20 ''''''''''''''''''' EFFACE FORMULE BENEF
.Cells(Index, 11).Value = TextBox21 ' PRET
.Columns("A:K").AutoFit
End With
End If
Me.OptionButton2 = False
EffaceConTrol Me
Me.ListBox1.Clear
Me.ListBox1.List = Range("A4:l" & derligne).Value
End Sub
Ajoute =0 dans Private Sub ListBox1_Click()
If ListBox1.ListIndex >= 0
Ajoute cette procédure à la fin
Private Sub UserForm_initialize()
derligne = Sheets("BRACELET").Range("A65536").End(xlUp).Row
Me.ListBox1.List = Range("A4:l" & derligne).Value
End Sub
a+