VBA批量创建文件夹

Sub createFolder()
    
    Dim wks As Worksheet
    
    On Error Resume Next
    
    Set wks = ThisWorkbook.Worksheets(1)
    basepath = ThisWorkbook.Path & "\"
    Max = wks.Range("A100000").End(xlUp).Row
  
    For i = 2 To Max
   
        VBA.MkDir (basepath & wks.Cells(i, 1))
    Next
End Sub

  

posted @ 2023-09-11 16:08  tec2019  阅读(98)  评论(0编辑  收藏  举报