Change path to suit
Add other Excel file types as required by changing
Case "xls"
to
Case "xls", "xlm"
Sub ListExcelFiles()
Dim lRow As Long
Dim sPath As String
Dim sFname As String
Dim sTmpArr() As String
sPath = "c:\Temp\"
sFname = Dir(sPath, vbNormal)
lRow = 1
Do Until sFname = ""
sTmpArr = Split(sFname, ".")
Select Case LCase(sTmpArr(UBound(sTmpArr)))
Case "xls"
lRow = lRow + 1
Cells(lRow, "a").Value = sFname
End Select
sFname = Dir
Loop
End Sub
--
mudraker
If my reply has assisted or failed to assist you I welcome your
Feedback.
www.thecodecage.com
------------------------------------------------------------------------
mudraker's Profile:
http://www.thecodecage.com/forumz/member.php?userid=18
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=69125