Any one know how to read names of folder in a dirlistbox? (im not lookking for path)
i want to set up a for/next loop to read the name of all folders listed in a dirlistbox
Thanks!
Printable View
Any one know how to read names of folder in a dirlistbox? (im not lookking for path)
i want to set up a for/next loop to read the name of all folders listed in a dirlistbox
Thanks!
Play with the code below and see if it helps.
1. Create new project with a form (Form1).
2. Add DirListBox on the Form1 (Dir1).
private sub Form_Load()
Dir1.Path = "C:\"
end sub
private sub Dir1_Click()
dim i as integer
for i = 0 to (Dir1.ListCount-1)
debug.print i & ". " & Dir1.List(i)
next i
end sub
-Cool Bizs