|
- Sub 按钮2_Click()
- Set fso = CreateObject("Scripting.FileSystemObject")
- fth = ThisWorkbook.Path & "\分析表.xlsm"
- Arr = [a1].CurrentRegion
- Application.ScreenUpdating = False
- For j = 2 To UBound(Arr)
- If Len(Arr(j, 1)) > 0 Then
- pth = ThisWorkbook.Path & "" & Arr(j, 1)
- If Not fso.folderexists(pth) Then
- MkDir pth
- End If
- For i = 2 To UBound(Arr)
- If Len(Arr(i, 2)) > 0 Then
- pth = ThisWorkbook.Path & "" & Arr(j, 1) & "" & Arr(i, 2)
- If Not fso.folderexists(pth) Then
- MkDir pth
- End If
- For l = 2 To UBound(Arr)
- If Len(Arr(l, 3)) > 0 Then
- pth = ThisWorkbook.Path & "" & Arr(j, 1) & "" & Arr(i, 2) & "" & Arr(l, 3) & ""
- If Not fso.folderexists(pth) Then
- MkDir pth
- End If
- fso.CopyFile fth, pth, True
- End If
- Next l
- End If
- Next i
- End If
- Next j
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|