|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
参与一下
- Sub ykcbf() '//2024.9.11
- Application.ScreenUpdating = False
- Set fso = CreateObject("Scripting.FileSystemObject")
- p = ThisWorkbook.Path & ""
- For Each f In fso.GetFolder(p).Files
- If LCase(f.Name) Like "*.xls*" Then
- If InStr(f, "~$") = 0 Then
- If InStr(f, ThisWorkbook.Name) = 0 Then
- Set wb = Workbooks.Open(f, 0)
- For Each sht In wb.Sheets
- If InStr(sht.Name, "2022") Then
- sht.Name = "2022"
- End If
- Next
- wb.Close 1
- End If
- End If
- End If
- Next
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
|