bonsoir tous le monde,
tout d'abord,je suis un apprenti vba excel
je voudrais remplir mon tableau a partir de ma boite de dialogue,
je m'explique.
tableau constituer de colonnes (désignation; Prix unitaire; Et les dates du mois(31 jours))
boite de dialogue.(Champ_désignation; Champ_quantité; Champ_prix unitaire; Champ_date ,)
alors voila mon code que j'ai écrit dans le module
mon problème c comment indiquer a excel de me remplir la quantité du produit désigné selon la date écrite dans ma boite de dialogue
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 Option Explicit Sub proced_Ajout_pdt_divers() Ajout_pdt_divers.champ_designation = "" Ajout_pdt_divers.champ_qte_entree = "" Ajout_pdt_divers.champ_prix_unitaire = "" Ajout_pdt_divers.Show Sheets("ENTREES DIVERS").Select Rows("10:10").Select Selection.Insert shift:=xlDown Range("a10").Select ActiveCell.Formula = Ajout_pdt_divers.champ_designation Range("b10").Select ActiveCell.Formula = Ajout_pdt_divers.champ_prix_unitaire If Sheets("ENTREES DIVERS").Range("d9") = Ajout_pdt_divers.champ_dte Then Range("d10").Select ActiveCell.Formula = Ajout_pdt_divers.champ_qte_entree Else If Sheets("ENTREES DIVERS").Range("e9") = Ajout_pdt_divers.champ_dte Then Range("e10").Select ActiveCell.Formula = Ajout_pdt_divers.champ_qte_entree Else If Sheets("ENTREES DIVERS").Range("f9") = Ajout_pdt_divers.champ_dte Then Range("f10").Select ActiveCell.Formula = Ajout_pdt_divers.champ_qte_entree Else If Sheets("ENTREES DIVERS").Range("g9") = Ajout_pdt_divers.champ_dte Then Range("g10").Select ActiveCell.Formula = Ajout_pdt_divers.champ_qte_entree Else If Sheets("ENTREES DIVERS").Range("h9") = Ajout_pdt_divers.champ_dte Then Range("h10").Select ActiveCell.Formula = Ajout_pdt_divers.champ_qte_entree Else End If End If
pour mieux me comprendre je vous envoie mon classeur en pièce jointe
Partager