Hi. I need to create a form that will take all the report files in directory C:\Program Files\AAA\BBB\Report Files and list them out in a VB6 Listbox. They are Crystal Reports and have the .rpt extension. Is there any way I can do this? Thanks in advance.
You can use the FileListBox control to list all the files in a folder or use the FileSystemObject to get the folder, loop through each file in it and add the names to the regular listbox by yourself. I recommend FileListBox control.
-Max
Dim FileName As String
FileName = Dir ("C:\Program Files\AAA\BBB\Report Files\*.rpt")
Do Until Len(FileName) = 0
List1.AddItem FileName
FileName = Dir()
Loop
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.