Bonjour,
J'ai le code d'erreur 91 et je ne comprend pas pourquoi.
Sub Autofill()
Dim Compos_1 As String
Dim Compos_2 As String
Dim Début_Ligne As Long
Dim Début_Colonne As Long
Dim Fin_Ligne As Long
Dim Fin_Colonne As Long
Dim Plage_Compos As Range
With Worksheets("Cost list").Range("A1:G500")
.Find("Project").Offset(0, 1).Copy _
Destination:=Worksheets("Estimation Rapide").Range("T3:X3") 'Nom du projet
.Find("Client").Offset(0, 1).Copy _
Destination:=Worksheets("Estimation Rapide").Range("F3:Q3") ' Nom du client
'----------------------------------Range_des_Compos---------------------------------------
Début_Ligne = .Find("Walls").Offset(1, 0).Row
Début_Colonne = .Find("Walls").Offset(1, 0).Column
Fin_Ligne = .Find("Detailed by components").Offset(-1, 6).Row
Fin_Colonne = .Find("Detailed by components").Offset(-1, 6).Column
ICI -> Plage_Compos = .Range(Cells(Début_Ligne, Début_Colonne), Cells(Fin_Ligne, Fin_Colonne))
End With
'----------------------------------Compos_1---------------------------------------
With Worksheets("Cost list").Range(Plage_Compos)
Compos_1 = .Find("Walls").Offset(1, 0) 'Compos_1
Worksheets("Estimation rapide").Range("C6") = Mid(Compos_1, 1, 1)
Worksheets("Estimation rapide").Range("D6") = Mid(Compos_1, 2, 1)
Worksheets("Estimation rapide").Range("E6") = Mid(Compos_1, 3, 1)
Worksheets("Estimation rapide").Range("F6") = Mid(Compos_1, 4, 1)
Worksheets("Estimation rapide").Range("G6") = Mid(Compos_1, 5, 1)
Worksheets("Estimation rapide").Range("H6") = Mid(Compos_1, 6, 1)
Worksheets("Estimation rapide").Range("I6") = Mid(Compos_1, 7, 1)
Worksheets("Estimation rapide").Range("J6") = Mid(Compos_1, 8, 1)
Worksheets("Estimation rapide").Range("K6") = Mid(Compos_1, 9, 1)
Worksheets("Estimation rapide").Range("L6") = Mid(Compos_1, 10, 1)
Worksheets("Estimation rapide").Range("M6") = Mid(Compos_1, 11, 1)
Worksheets("Estimation rapide").Range("N6") = Mid(Compos_1, 12, 1)
Worksheets("Estimation rapide").Range("O6") = Mid(Compos_1, 13, 1)
J'ai le code d'erreur 91 et je ne comprend pas pourquoi.
Sub Autofill()
Dim Compos_1 As String
Dim Compos_2 As String
Dim Début_Ligne As Long
Dim Début_Colonne As Long
Dim Fin_Ligne As Long
Dim Fin_Colonne As Long
Dim Plage_Compos As Range
With Worksheets("Cost list").Range("A1:G500")
.Find("Project").Offset(0, 1).Copy _
Destination:=Worksheets("Estimation Rapide").Range("T3:X3") 'Nom du projet
.Find("Client").Offset(0, 1).Copy _
Destination:=Worksheets("Estimation Rapide").Range("F3:Q3") ' Nom du client
'----------------------------------Range_des_Compos---------------------------------------
Début_Ligne = .Find("Walls").Offset(1, 0).Row
Début_Colonne = .Find("Walls").Offset(1, 0).Column
Fin_Ligne = .Find("Detailed by components").Offset(-1, 6).Row
Fin_Colonne = .Find("Detailed by components").Offset(-1, 6).Column
ICI -> Plage_Compos = .Range(Cells(Début_Ligne, Début_Colonne), Cells(Fin_Ligne, Fin_Colonne))
End With
'----------------------------------Compos_1---------------------------------------
With Worksheets("Cost list").Range(Plage_Compos)
Compos_1 = .Find("Walls").Offset(1, 0) 'Compos_1
Worksheets("Estimation rapide").Range("C6") = Mid(Compos_1, 1, 1)
Worksheets("Estimation rapide").Range("D6") = Mid(Compos_1, 2, 1)
Worksheets("Estimation rapide").Range("E6") = Mid(Compos_1, 3, 1)
Worksheets("Estimation rapide").Range("F6") = Mid(Compos_1, 4, 1)
Worksheets("Estimation rapide").Range("G6") = Mid(Compos_1, 5, 1)
Worksheets("Estimation rapide").Range("H6") = Mid(Compos_1, 6, 1)
Worksheets("Estimation rapide").Range("I6") = Mid(Compos_1, 7, 1)
Worksheets("Estimation rapide").Range("J6") = Mid(Compos_1, 8, 1)
Worksheets("Estimation rapide").Range("K6") = Mid(Compos_1, 9, 1)
Worksheets("Estimation rapide").Range("L6") = Mid(Compos_1, 10, 1)
Worksheets("Estimation rapide").Range("M6") = Mid(Compos_1, 11, 1)
Worksheets("Estimation rapide").Range("N6") = Mid(Compos_1, 12, 1)
Worksheets("Estimation rapide").Range("O6") = Mid(Compos_1, 13, 1)