Private Sub Command1_Click()
Dir1.Path = "f:\"
GetAllFolders LstBox, Dir1
End SubPrivate Sub GetAllFolders(Lst As ListBox, ByVal Dir As DirListBox)
Dim i As Long, Count As Long, sTemp As String
With Dir
Count = .ListCount
If Count <> 0 Then
For i = 0 To Count - 1
Lst.AddItem .List(i)
sTemp = .Path
Dir.Path = .List(i)
GetAllFolders Lst, Dir
Dir.Path = sTemp
Next
End If
End With
End Sub
Dir1.Path = "f:\"
GetAllFolders LstBox, Dir1
End SubPrivate Sub GetAllFolders(Lst As ListBox, ByVal Dir As DirListBox)
Dim i As Long, Count As Long, sTemp As String
With Dir
Count = .ListCount
If Count <> 0 Then
For i = 0 To Count - 1
Lst.AddItem .List(i)
sTemp = .Path
Dir.Path = .List(i)
GetAllFolders Lst, Dir
Dir.Path = sTemp
Next
End If
End With
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货