Filling a ListBox with Folder Names

  • Thread starter Thread starter VB Novice Hendri
  • Start date Start date
V

VB Novice Hendri

Guest
As the heading say, how do I goabout Filling a ListBox with Folder Names.

I have tryed this, pleas help correct me where I gone wrong.

Sub FillCategoryListBox()

Dim RecipeFolder As String = "M:\My Documents\My Resepte\Hoofgeregte\Drankies"

Dim Folders() As String = Directory.GetDirectories(RecipeFolder)
Me.CategoryListBox.Items.Clear()
For Each Folder As String In Folders
CategoryListBox.Items.Add(Path.GetFileName(Folder))
Next

End Sub

Continue reading...
 

Similar threads

V
Replies
0
Views
143
VB Novice Hendri
V
V
Replies
0
Views
122
VB Novice Hendri
V
V
Replies
0
Views
126
VB Novice Hendri
V
V
Replies
0
Views
133
VB Novice Hendri
V
Back
Top