How?
Printable View
How?
Try thisVB Code:
Private Sub Command1_Click() Dim LoadFiles As String List1.Clear LoadFiles = Dir("c:\program files\qcap\*.*") Do While LoadFiles > "" List1.AddItem LoadFiles LoadFiles = Dir Loop End Sub
or use da file list box
What if you didn't want the file names, but just wanted the folder names?
A minor amendment to my previous post should do the trickVB Code:
Private Sub Command1_Click() List1.Clear Dim LoadFiles As String List1.Clear LoadFiles = Dir("c:\program files\", vbDirectory) Do While LoadFiles > "" List1.AddItem LoadFiles LoadFiles = Dir Loop End Sub
then use FolderListBox control and check the Path property
on second thought it's called the DirListBox control... oops