Sub
DatenUebertrag()
Dim
oMe
As
Worksheet, iZeile
As
Long
, oDatei
As
Object
Dim
oFS
As
Object
, wbQuelle
As
Workbook, sBlatt
As
String
Set
oMe = ThisWorkbook.ActiveSheet
Const
sDateiPfad
As
String
=
"…….."
iZeile = 19
Application.ScreenUpdating =
False
Set
oFS = CreateObject(
"Scripting.FileSystemObject"
)
For
Each
oDatei
In
oFS.GetFolder(sDateiPfad).Files
If
InStrRev(oDatei.Name,
"xlsx"
)
Then
sBlatt =
"Tabelle1"
oMe.Cells(iZeile, 2) = GetValue(sDateiPfad, oDatei.Name, sBlatt, Range(
"B4"
))