Suivre un inventaire en utilisant un Userform
Résolu
bassmart
Messages postés
281
Date d'inscription
Statut
Membre
Dernière intervention
-
bassmart Messages postés 281 Date d'inscription Statut Membre Dernière intervention -
bassmart Messages postés 281 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- Suivre un inventaire en utilisant un Userform
- Suivre un colis - Guide
- Comment utiliser un chromecast - Guide
- Suivre position google - Guide
- Suivre en retour instagram - Guide
- Notice d'utilisation en français - Guide
2 réponses
Bonjour,
Merci de joindre un fichier anonymé sur : https://www.cjoint.com/
Franchement avec un userform, il faut vraiment mieux le faire comme ca, sinon c'est très difficile de voir à quoi ressemble le truc.
Cordialement.
Merci de joindre un fichier anonymé sur : https://www.cjoint.com/
Franchement avec un userform, il faut vraiment mieux le faire comme ca, sinon c'est très difficile de voir à quoi ressemble le truc.
Cordialement.
Bonjour
Un contrôle Textbox renvoie du texte...
Range("B2") = Range("B2") + TextBox1 * 1
Un contrôle Textbox renvoie du texte...
Range("B2") = Range("B2") + TextBox1 * 1
Je pense avoir trouvé une solution, ce n'est probablement la plus efficace, mais ça fonctionne. Voici mon code:
Qu'en pensez-vous?
Merci!
Private Sub CommandButton1_Click() Sheets("Inventaire").Unprotect If TextBox2 = IsNumeric(TextBox2) Then Range("B4") = Range("B4") + TextBox2.Value End If If TextBox3 = IsNumeric(TextBox3) Then Range("B5") = Range("B5") + TextBox3.Value End If If TextBox4 = IsNumeric(TextBox4) Then Range("B6") = Range("B6") + TextBox4.Value End If If TextBox5 = IsNumeric(TextBox5) Then Range("B7") = Range("B7") + TextBox5.Value End If If TextBox6 = IsNumeric(TextBox6) Then Range("B8") = Range("B8") + TextBox6.Value End If If TextBox7 = IsNumeric(TextBox7) Then Range("B9") = Range("B9") + TextBox7.Value End If If TextBox8 = IsNumeric(TextBox8) Then Range("B10") = Range("B10") + TextBox8.Value End If If TextBox9 = IsNumeric(TextBox9) Then Range("B11") = Range("B11") + TextBox9.Value End If If TextBox10 = IsNumeric(TextBox10) Then Range("b13") = Range("b13") + TextBox10.Value End If If TextBox11 = IsNumeric(TextBox11) Then Range("b15") = Range("b15") + TextBox11.Value End If If TextBox12 = IsNumeric(TextBox12) Then Range("b17") = Range("b17") + TextBox12.Value End If If ComboBox1 = "" Then MsgBox "Choisissez un nom dans la liste!" Else Unload Me End If Range("B22") = ComboBox1.Value Sheets("Inventaire").Protect End Sub
Qu'en pensez-vous?
Merci!
Est-ce qu'il y a un moyen de simplifier tout ça et d'ajouter une validation pour que la valeur soit numérique sinon il envoi un message d'erreur du genre
Merci pour votre aide!
If TextBox3 = IsNumeric(TextBox3) Then Range("C4") = Range("C4") + TextBox3.Value ElseIf Not IsNumeric(TextBox3) Then MsgBox "Valeur non numériques!", vbCritical End IfCe code fonctionne, mais je doit le copier pour chacun des textbox, c'est un peu lourd!
Merci pour votre aide!
Voici le lien : http://www.cjoint.com/c/EIzoDSYlbPo
Merci!