Amadom
Programmer
- Nov 16, 2001
- 10
I want to get the list of files in a directory into an array
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub ReadFiles()
Dim sFiles() As String
Dim sFile As String
Dim iCount As Long
iCount = 1
sFile = Dir("C:\Temp\*.*")
Do While sFile <> ""
ReDim Preserve sFiles(iCount)
sFiles(iCount) = sFile
sFile = Dir
iCount = iCount + 1
Loop
End Sub