给你一个批量打开同一文件夹里EXCEL文件的框架,每个文件需要处理的代码放进腔态锋去就可以了
Sub 批量打开()
MyPath = "D:\Excel Programe\ABCD\" '换为你自己保存EXCEL的文件夹
myfile = Dir(MyPath & "*.xls")
Do While myfile <> "" And ActiveWorkbook.Name <> myfile
Workbooks.Open Filename:=MyPath & myfile
每页要做伍晌闭游的代码
ActiveWorkbook.Saved = True
ActiveWorkbook.Close '(SaveChanges)
myfile = Dir
Loop
End Sub
将该宏设定为加载宏,就可以了。