Bouton modifier dans un formulaire VBA_Excel

  • Auteur de la discussion Mirguy23
  • Date de début

Mirguy23

Habitué
Bonjour,
J'ai une erreur d’exécution de mon à cause de mon bouton modifier.
Je joins une image de mon UserForm.

Option Explicit
Private Sub CommandButton1_Click()
If Me.Délai = "" Or Me.Commentaire < 0 Or Me.Commentaire = "" Or Me.Délai < 0 Then
MsgBox ("Veillez pointer la ligne de commande à modifier!")
Else

Sheets("Synthese").ListObjects(1).DataBodyRange(Me.Rowid, 10) = Me.Délai
Sheets("Synthese").ListObjects(1).DataBodyRange(Me.Rowid, 11) = Me.Commentaire
End If
End Sub
Private Sub CommandButton39_Click()
ThisWorkbook.Save
End Sub
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim ligne As Integer
On Error Resume Next
ligne = Me.ListBox1.ListIndex
Me.Qté_cdée = Me.ListBox1.Column(8, ligne)
Me.a_livrer = Me.ListBox1.Column(9, ligne)
Me.Délai = Me.ListBox1.Column(10, ligne)
Me.Besoin = Me.ListBox1.Column(14, ligne)
Me.Sto_phy = Me.ListBox1.Column(15, ligne)
Me.Sto_cde = Me.ListBox1.Column(16, ligne)
Me.Sto_rés = Me.ListBox1.Column(17, ligne)
Me.Sto_théo = Me.ListBox1.Column(18, ligne)
Me.Livr = Me.ListBox1.Column(19, ligne)
Me.Livr = CDate(Me.Livr)
Me.Qte_plan = Me.ListBox1.Column(21, ligne)
Me.Qte_réal = Me.ListBox1.Column(22, ligne)
Me.Ope = Me.ListBox1.Column(23, ligne)
Me.Commentaire = Me.ListBox1.Column(11, ligne)
Me.Rowid = Me.ListBox1.Column(0, ligne)
End Sub

Private Sub search_loop_Change()

ListBox1.ColumnCount = 30
ListBox1.RowSource = "A2: AB9847"
Me.Label1.Caption = Me.ListBox1.ListCount & " Ligne(s)"
End Sub
 

Fichiers joints

  • demonstration.PNG
    demonstration.PNG
    103 KB · Affichages: 1

drul

Obscur pro du hardware
Staff
Pose un point d'arrêt pour voir ce contient me.delai ...
 
Vous devez vous inscrire ou vous connecter pour répondre ici.
Derniers messages publiés
Statistiques globales
Discussions
730 098
Messages
6 717 055
Membres
1 586 282
Dernier membre
Yannick3553
Partager cette page
Haut