Sub a()
Dim myFile, myPath
myPath = "C:\"
myFile = Dir("C:\" & "*.xlsx")
Do While myFile <> ""
If myFile <> ThisWorkbook.Name Then
Workbooks.Open (myPath & myFile)
'代码
Workbooks(myFile).Save
Workbooks(myFile).Close
End If
myFile = Dir
Loop
End Sub
ExcelVBA遍历文件
最新推荐文章于 2024-08-28 16:11:11 发布