I wanted to add all the names of the files in a folder in my computer to a list box in my vb program, so i used:
So i expect to get the file names in the path i've chosen ("G:\foler1\folder2\") to be added to List1. But there are 2 problems:Code:Do List1.AddItem Dir("G:\foler1\folder2\") Loop
- the computer doesn't stop looping, so i need a code to tell it stop if there are no more files
- if the loop works, still the the program only adds the first file name to the listbox and keeps adding the first one in the loop.
a little help on this please, asap. thank u![]()




Reply With Quote