Connecting Tech Pros Worldwide Forums | Help | Site Map

How to Access SubFolders

Newbie
 
Join Date: Aug 2006
Location: Arakkonam - Chennai
Posts: 20
#1: Aug 17 '06
Hi,
I have one folder if D drive. Ex:- D:\Login
I have some sub folders in this Login Folder,
Ex:-

D:
Login (root folder)
Suresh (sub folder)
Thiyagu (sub folder)
Sriram (sub folder)
Sriram (sub folder)
Vivekanandan (sub folder)

My Question is,
How to read that all sub folders(only by using root folder), I want only that sub folder names of Login folder(root folder). But, I don't know how many subfolders are there in Login folder(root folder).

Regards,
Suresh.

Newbie
 
Join Date: Aug 2006
Posts: 8
#2: Aug 28 '06

re: How to Access SubFolders


try this...

create a DirListBox (Dir1) and a command button, ff code will work :)

Private Sub Command1_Click()

Dim i As Integer
Dir1.Path = "e:\ListOfXXXDirs"
Dir1.Refresh

For i = 1 To Dir1.ListCount
MsgBox Dir1.List(i - 1)
Next i

msgbox "HAPPY CODIn :) " & chr(13) & " *wappy*"

End Sub
Reply