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
| Option Compare Text
Sub edition()
Dim T_client(), T_commande()
Dim i_client As Integer, num_client As Integer, prenom As String, adress As String, num_adress As Integer, ville As String, zip As Long
T_client = Range("J725").Value
Sheets("client").Activate
nom = InputBox("Nom du client ?")
MsgBox UBound(T_client)
For i_client = 1 To UBound(T_client)
If (nom = T_client(i_client, 2)) Then
prenom = T_client(i_client, 3)
num_client = T_client(i_client, 1)
num_adress = T_client(i_client, 5)
adress = T_client(i_client, 4)
ville = T_client(i_client, 6)
zip = T_client(i_client, 7)
Sheets("fiche").Activate
Range("C2").Value = nom + " " + prenom
Range("E2").Value = num_client
Range("C3").Value = num_adress + " " + zip
i_client = UBound(T_client)
End If
Next i_client
End Sub |
Partager