VBA程序代码:
Option ExplicitSub x() Dim pt$, fn$ pt = "D:\test\" fn = Dir(pt & "*.xls") While fn <> "" With Workbooks.Open(pt & fn) .Save .Close End With fn = Dir WendEnd Sub
VBA编程完成