Hi guys
i am guessing i cant have what i want as most of the similar topics in this forum all point to Dialogopen but i was hoping to populate a listbox with a precoded folders filelist. any ideas?
Printable View
Hi guys
i am guessing i cant have what i want as most of the similar topics in this forum all point to Dialogopen but i was hoping to populate a listbox with a precoded folders filelist. any ideas?
VBA, not VB6? If the version of VBA offers a FileList control, you can use that. Set the path and pattern properties, as needed, during runtime. Otherwise, you can use the Dir$() function -- think it is in all VBA versions. Populate a normal listbox with the results:
Code:Dim sFile As String
sFile = Dir$("[path]\*.*", vbNormal Or vbHidden Or vbSystem or vbReadOnly or vbArchive)
Do Until sFile = ""
List1.AddItem sFile
sFile = Dir$()
Loop
\o/ thanks