1个回答
2011-04-19
展开全部
Private Sub GetFoldersFromPath(Byval lpFolder As String,iTextBox As TextBox)
Dim FSO As Object
Dim oFolder
Set FSO=CreateObject("Scripting.FileSystemObject")
For Each oFolder In FSO.GetFolder(lpFolder).SubFolders
iTextBox=iTextBox & "|" & oFolder.Name
Next
Set FSO=Nothing
End Sub
Dim FSO As Object
Dim oFolder
Set FSO=CreateObject("Scripting.FileSystemObject")
For Each oFolder In FSO.GetFolder(lpFolder).SubFolders
iTextBox=iTextBox & "|" & oFolder.Name
Next
Set FSO=Nothing
End Sub
更多追问追答
追问
可以写的详细一点吗,我不太懂,谢谢
追答
You gotta be kidding me?
Isn't that clear? OK,try this:
Private Sub Command1_Click()
GetFoldersFromPath "C:\", Text1
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询