The following code return a list of files & file path in the directory except for the frist file in directory, but it adds to the end of the list one file path without file. Total lines in list equals number of Files in directory. There is a sub directory in the directory which I do not need in the list nor it contents. What I am missing?
Thank you
David
strDir = ThisWorkbook.Path
Let strName = Dir(strDir & "\*.*")
Do While strName <> vbNullString
Let j = j + 1
' Let strArr(i, 1) = strDir & "\" & strName
Let strName = Dir()
'Sheets("List").Cells(j, 1) = strArr
Sheets("List").Cells(j, 1) = strDir & "\" & strName
Loop
Thank you
David
strDir = ThisWorkbook.Path
Let strName = Dir(strDir & "\*.*")
Do While strName <> vbNullString
Let j = j + 1
' Let strArr(i, 1) = strDir & "\" & strName
Let strName = Dir()
'Sheets("List").Cells(j, 1) = strArr
Sheets("List").Cells(j, 1) = strDir & "\" & strName
Loop