Suivre un inventaire en utilisant un Userform
Résolu/Fermé
bassmart
Messages postés
281
Date d'inscription
jeudi 19 février 2015
Statut
Membre
Dernière intervention
19 décembre 2023
-
23 sept. 2015 à 21:16
bassmart Messages postés 281 Date d'inscription jeudi 19 février 2015 Statut Membre Dernière intervention 19 décembre 2023 - 28 sept. 2015 à 20:47
bassmart Messages postés 281 Date d'inscription jeudi 19 février 2015 Statut Membre Dernière intervention 19 décembre 2023 - 28 sept. 2015 à 20:47
A voir également:
- Suivre un inventaire en utilisant un Userform
- Suivre un colis - Guide
- Comment utiliser un chromecast - Guide
- Suivre position google - Guide
- Notice d'utilisation en français - Guide
- Suivre un transfert moneygram ✓ - Forum Vos droits sur internet
2 réponses
Kuartz
Messages postés
850
Date d'inscription
vendredi 13 février 2015
Statut
Membre
Dernière intervention
15 février 2019
61
Modifié par Kuartz le 24/09/2015 à 09:05
Modifié par Kuartz le 24/09/2015 à 09:05
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.
michel_m
Messages postés
16603
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
16 décembre 2023
3 306
24 sept. 2015 à 09:08
24 sept. 2015 à 09:08
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
michel_m
Messages postés
16603
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
16 décembre 2023
3 306
25 sept. 2015 à 16:50
25 sept. 2015 à 16:50
Excuse moi de t'avoir dérangé
bonne continuation
bonne continuation
bassmart
Messages postés
281
Date d'inscription
jeudi 19 février 2015
Statut
Membre
Dernière intervention
19 décembre 2023
1
Modifié par bassmart le 28/09/2015 à 18:25
Modifié par bassmart le 28/09/2015 à 18:25
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!
bassmart
Messages postés
281
Date d'inscription
jeudi 19 février 2015
Statut
Membre
Dernière intervention
19 décembre 2023
1
28 sept. 2015 à 20:47
28 sept. 2015 à 20:47
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!
25 sept. 2015 à 16:31
Voici le lien : http://www.cjoint.com/c/EIzoDSYlbPo
Merci!