Sub 批量创建文件夹()
Dim pth$
With Application.FileDialog(msoFileDialogFolderPicker)
.Title = "选择文件夹"
If .Show Then
pth = .SelectedItems(1)
End If
End With
If IsEmpty(pth) Then Exit Sub '如果按取消键,退出
Dim arr
arr = Range("a1").CurrentRegion
Dim i As Long
For i = LBound(arr, 1) To UBound(arr, 1)
MkDir pth & "\" & arr(i, 1)
Next
End Sub
05-13
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交