Simple Code To List all the Files in a Directory into a List Box
Simple Code To List all the Files in a Directory into a List Box
API Declarations
'Controls : List Box,Command Button
Dim Fs as Scripting.FileSystemObject
Dim Fld as Folder
Dim Fls as Files,Fl as File
'=====================================
'For Suggestion and queries mail to
'[email protected]
'=====================================
Rate Simple Code To List all the Files in a Directory into a List Box
(1(1 Vote))
set fs = CreateObject("Scripting.FileSystemObject")
set fld = fs.GetFolder("C:\") ' You can specify any folder name with path here
set fls = fld.getFiles
list1.clear
for each fl in fls
list1.additem fl.name
next
list1.refresh
End Sub
Simple Code To List all the Files in a Directory into a List Box Comments
No comments yet — be the first to post one!
Post a Comment