"Paul H" <no****@nospam.com> wrote in message
news:N9*******************@newsfe4-win.ntli.net...
I have developed several databases in Access. I know VBA. I am making the
jump to VB and am currently using Visual basic 2005 Express.
Can anyone give me a snippet that will show me how to list the contents of
a directory in a listbox.
If you could also point me toward a good beginners VB 2005 book or website
I would appreciate it.
I'm still playing with this but:
Dim S As String, I As Integer, L As ListViewItem, J As Long, T As Date
For I = 0 To CheckedListBox1.Items.Count - 1
S = CheckedListBox1.Items(I)
dlgOpenFile.InitialDirectory = S
For Each foundFile As String In My.Computer.FileSystem.GetFiles( _
S, FileIO.SearchOption.SearchAllSubDirectories, "*.*")
ListView2.Items.Add(foundFile)
L = ListView2.Items(ListView2.Items.Count - 1)
L.Checked = True
Next
I'm using a ListView but a Listbox works too.