Bonjour , j'ai un problème avec mon code:
"Option Explicit
Dim Ws As Worksheet
'Correspond au programme du bouton MODIFIER
Private Sub CommandButton1_Click()
Dim Ligne As Long
Dim I As Integer
If MsgBox("Etes-vous certain de vouloir modifier ce produit ?", vbYesNo, "Demande de confirmation") = vbYes Then
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox1.ListIndex + 2
For I = 1 To 23
If Me.Controls("TextBox" & I).Visible = True Then
Ws.Cells(Ligne, I + 1) = Me.Controls("TextBox" & I)
End If
Next I
End If
End Sub"
Lorsque je clic sur modifier j'ai une erreur...
je ne sais pas pourquoi.