1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub copie()
Dim Fichier As String
Worksheets("RECAP").Activate
Fichier = "D:\aide\SY.xlsm"
If Dir(Fichier) = "" Then
MsgBox "Fichier " & Fichier & " introuvable"
Exit Sub
End If
With Workbooks.Open(Fichier)
.Sheets("feuil1").Range("B2").Copy
ThisWorkbook.Sheets("RECAP").Range("D6").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Sheets("feuil1").Range("B3").Copy
ThisWorkbook.Sheets("RECAP").Range("D8").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Sheets("feuil1").Range("B4").Copy
ThisWorkbook.Sheets("RECAP").Range("D9").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Close savechanges:=False
End With
End Sub |
Partager