'Correspond au programme du bouton MODIFIER
Private Sub CommandButton2_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 'On sort si pas de sélection
Ligne = Me.ComboBox1.ListIndex + 2
For i = 1 To 8
If Me.Controls("TextBox" & i).Visible = True Then
Ws.Cells(Ligne, i + 1) = Me.Controls("TextBox" & i)
End If
Next i
End If 'fin de la condition
'Code permettant de modifier le format de la plage de cellule en format nombre
With Ws.Range("D2:d10")
.NumberFormat = "0"
.Value = .Value
End With
End Sub
Il y a un soucis quand le remplis le formulaire et que je clique sur ajouter. Le blocage est surligné précédemment.