Sub test2()
'pour une plage classique
Dim chemin$, fichier$, feuille$, rngsource As Range, rngdestination As Range
chemin = ThisWorkbook.Path & "\" 'ne pas oublier le dernier slach
fichier = "source.xlsx"
feuille = "toto"
Set rngsource = [b4:d10]
Set rngdestination = Sheets("Feuil1").[A1]
GetTableOnClosedFich2 chemin, fichier, feuille, rngsource, rngdestination
End Sub
Sub GetTableOnClosedFich2(chemin$, fichier$, feuille$, rng As Object, rngD As Range)
Dim tabl, lig&, col&
ReDim tabl(1 To rng.Rows.Count, 1 To rng.Columns.Count)
For lig = 1 To UBound(tabl)
For col = 1 To UBound(tabl, 2)
tabl(lig, col) = ExecuteExcel4Macro("'" & chemin & "[" & fichier & "]toto'!" & rng.Cells(lig, col).Address(, , xlR1C1))
Next
Next
Application.ScreenUpdating = False
rngD.Resize(rng.Rows.Count, rng.Columns.Count).Value = tabl
Application.ScreenUpdating = True
End Sub