[求助] 如何提取文件夾名稱
Sub Get_SubFolder_Names()
Dim RtFolder, nlFolder
Dim xrow As Long
RtFolder = ThisWorkbook.Path & "\" '这里指定你的根目录
' RtFolder = "C:\Users\Administrator\Desktop\" '这里指定你的根目录
xrow = 0
With CreateObject("Scripting.FileSystemObject").GetFolder(RtFolder)
For Each nlFolder In .subfolders
ActiveCell.Offset(xrow) = nlFolder.Name
xrow = xrow + 1
Next nlFolder
End With
End Sub