|
纯练手。。。
- Sub ykcbf() '//2024.4.11
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- Set fso = CreateObject("Scripting.FileSystemObject")
- p = ThisWorkbook.Path & ""
- r = Cells(Rows.Count, 4).End(3).Row
- arr = [d1].Resize(r, 1)
- f = "虹桥视频上传登记表模板.xls"
- On Error Resume Next
- For i = 2 To UBound(arr)
- rq = Format(arr(i, 1), "yyyy年m月d日")
- p1 = p & rq & ""
- If Not fso.FolderExists(p1) Then fso.CreateFolder p1
- fn = p1 & rq & "-" & f
- FileCopy p & f, fn
- Next
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
|