'Pour le bouton modifier
Private Sub CommandButton_modifier_click()
Dim ligne As Long
Dim I As Integer
If MsgBox("Confirmer la modification de cet article ?", vbYesNo, "Demande de confirmation de modification") = vbYes Then
If Me.ComboBox_code.ListIndex = -1 Then Exit Sub
ligne = Me.ComboBox_code.ListIndex + 2
Ws.Cells(ligne, "B") = ComboBox_categorie
For I = 1 To 39
If Me.Controls("Textbox" & I).Visible = True Then
Ws.Cells(ligne, I + 2) = Me.Controls("TextBox" & I).Value
End If
Next I
End If
End Sub