Sub copie()
Dim tab1()
Dim classeur As Workbook
Dim NomSource As String
Dim DateHeure As String
Dim chemin As String
Dim c As Integer
Dim d As String
DateHeure = "2018-04-07-06-23-58"
NomSource = "nom_de_la_Zone_" & DateHeure & ".xlsx"
chemin = "C:\Users\aud\Documents\aide excel\Tophcrea\"
For Each classeur In Workbooks
If classeur.Name = NomSource Then
c = 1
End If
Next
If c <> 1 Then
d = chemin & NomSource
Workbooks.Open d, ReadOnly:=True
End If
NbLigneAImporter = Application.WorksheetFunction.CountA(Workbooks(NomSource).Worksheets("Rapport 1").Range(Workbooks(NomSource).Worksheets("Rapport 1").Range("B5").Address, Workbooks(NomSource).Worksheets("Rapport 1").Range("B5").End(xlDown).Address))
tab1 = Workbooks(NomSource).Worksheets("Rapport 1").Range(Workbooks(NomSource).Worksheets("Rapport 1").Range("B5").Address, Workbooks(NomSource).Worksheets("Rapport 1").Range("S" & 4 + NbLigneAImporter).Address).Value
Workbooks("DB.xlsm").Worksheets("Feuil1").Range("F" & Workbooks("DB.xlsm").Worksheets("Feuil1").Range("F1").End(xlDown).Row + 1, "W" & Workbooks("DB.xlsm").Worksheets("Feuil1").Range("F1").End(xlDown).Row + NbLigneAImporter) = tab1
Workbooks(NomSource).Close SaveChanges:=False
End Sub