Bonjour à tous

Sur un formulaire me permettant de saisir les commandes d'un groupe,
j'utilise la combobox "opération" pour spécifiez le type de commande ("parfum", "bijou", "poisson",...)

ensuite je saisie jusqu'à 10 nom dans des combobox ("nom1" à "nom10") et 10 montant dans des textbox ("mtt1" à "mtt10")

j'utilise un code assez lourd et répétitif

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
 
 
'ecrire les commandes
If nom1.Value <> "" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(1, 0) = commande1.Value
If nom1.Value <> "" Then Sheets("commandegroupée").Range("b65536").End(xlUp).Offset(1, 0) = nom1.Value
If operation.Value = "parfum" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 2).Value = mtt1.Value
If operation.Value = "bijou" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 3).Value = mtt1.Value
If operation.Value = "poisson" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 4).Value = mtt1.Value
If operation.Value = "habillement" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 5).Value = mtt1.Value
If operation.Value = "livre" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 6).Value = mtt1.Value
If operation.Value = "parapharmacie" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 7).Value = mtt1.Value
If operation.Value = "viande" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 8).Value = mtt1.Value
If operation.Value = "consommable" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 9).Value = mtt1.Value
If operation.Value = "garantie" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 10).Value = mtt1.Value
If operation.Value = "photo" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 11).Value = mtt1.Value
If operation.Value = "ustensille" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 12).Value = mtt1.Value
If operation.Value = "pain" Then Sheets("commandegroupée").Range("a65536").End(xlUp).Offset(0, 13).Value = mtt1.Value
et je répète ce code encore 9 fois

comment puis-je le simplifier

merci pour votre aide