Sub ListFilesInC()
Call ShowFolderList("c:")
End Sub
Sub ShowFolderList(folderspec)
Dim fso As Object
Dim fld As Object
Dim fils As Object
Dim fil As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder(folderspec)
Set fils = fld.Files
For Each fil In fils
MsgBox fil.Name
Next
Set fil = Nothing
Set fils = Nothing
Set fld = Nothing
Set fso = Nothing
End Sub