Merci pour le fichier.
Il vaut mieux inverser l'ordre de ces 2 instructions :
Sheets("client").Activate
T_client = Range("J7:P25").Value
ou préciser
T_client = Sheets("client").Range("J7:P25").Value
je ne sais pas comment était lancée cette macro, mais c'est peut-être de là que venait l'erreur si elle était lancée d'une autre feuille !
J'ai une erreur sur cette ligne. Le num_adress et le zip étant numérique, il faut remplacer + par &
Range("C3").Value = num_adress & " " & zip
Après, la macro fait bien ce qui est écrit ...
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 = Sheets("client").Range("J7:P25").Value
nom = InputBox("Nom du 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 & " " & adress & " " & zip & " " & ville
Exit For
End If
Next i_client
End Sub