OK, try this.
Sub GetFileNames2()
Dim xRow As Long
Dim xDirect$, xFname$, InitialFoldr$
InitialFoldr$ = "C:/Documents%20and%20Settings/eisayev/My%20Documents/Downloads/" '<<< Startup folder to begin searching from
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Application.DefaultFilePath & "\"
.Title = "Please select a folder to list Files from"
.InitialFileName = InitialFoldr$
.Show
If .SelectedItems.Count <> 0 Then
xDirect$ = .SelectedItems(1) & "\"
xFname$ = Dir(xDirect$, 7)
Do While xFname$ <> ""
Workbooks.Open xDirect$ & xFname$
ActiveWorkbook.Sheets(1).Activate
For M = 6 To Cells(7, ActiveSheet.Columns.Count).End(xlToLeft).Column
X = X + 1
ThisWorkbook.Sheets(1).Cells(X, 4) = X
ThisWorkbook.Sheets(1).Cells(X, 5) = ActiveSheet.Cells(7, M)
ThisWorkbook.Sheets(1).Cells(X, 6) = ThisWorkbook.Sheets(1).Cells(N, 1)
Next M
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
xFname$ = Dir
Loop
End If
End With
End Sub
Bookmarks