Bonjour,
Une erreur d'éxecution 9 intervient dans mon programme sans que je sache pourquoi.
Voici mon code :
Dim wkDest As Workbook
Dim Tablo
'******Recopie classeur --> classeur
Set wkDest_1 = Application.Workbooks.Open("C:\Users\baptiste.moulin\Desktop\BS CABLE\Test\SIGNAL CABLE TEST SHEET.xlsx")
'ThisWorkbook.Sheets("MCC - INS - CABLES").Range("B16:B18").Copy wkDest.Sheets("Feuil1").Range("A1")
'wkDest.Close True
'***** tant que cellule pleine recopie
'Application.ScreenUpdating = False
With ThisWorkbook.Sheets("MCC - INS - CABLES")
Num_Doc = .Range(.Cells(16, 4), .Cells(.Cells(.Rows.Count, 1).End(xlUp).Row, 4))
Tag = .Range(.Cells(16, 2), .Cells(.Cells(.Rows.Count, 1).End(xlUp).Row, 2))
Brins = .Range(.Cells(16, 6), .Cells(.Cells(.Rows.Count, 1).End(xlUp).Row, 6))
Section = .Range(.Cells(16, 7), .Cells(.Cells(.Rows.Count, 1).End(xlUp).Row, 7))
Typ_Cab = .Range(.Cells(16, 5), .Cells(.Cells(.Rows.Count, 5).End(xlUp).Row, 5))
With wkDest_1.Sheets("Sheet1")
For i = LBound(Num_Doc, 1) To UBound(Num_Doc, 1)
For j = LBound(Num_Doc, 2) To UBound(Num_Doc, 2)
If Num_Doc(i, j) <> "" Then .Cells(2 + i, 7 + j) = Num_Doc(i, j)
If Tag(i, 2 - j) <> "" Then .Cells(4 + i, 1 + j) = Tag(i, j)
If Typ_Cab(i, 1 + j) <> "" Then .Cells(4 + i, 3 + j) = Typ_Cab(i, j)
If Brins(6 + i, j) <> "" Then .Cells(1 + i, 1 + j) = Brins(i, j)
If Section(i, 3 + j) <> "" Then .Cells(1 + i, 1 + j) = Section(i, j)
Next j
Next i
End With
L'erreur concerne les lignes typ_cab, Brins et section.
Les lignes Num_Doc et Tag fonctionnent parfaitement.
Merci pour votre aide.
Cordialement.