发布网友 发布时间:2022-04-21 10:32
共1个回答
热心网友 时间:2023-07-17 03:16
你是常常要做这个工作么,还是只做一次追答Sub szhz()
Dim xlsFile As String , i As Long
Application.ScreenUpdating = False
xlsFile = Dir("D:\*.xls*")
On Error Resume Next
Do
Workbooks.Open Filename:="D:\" & xlsFile
i = i + ActiveWorkbook.ActiveSheet.[A1]
ActiveWindow.Close
xlsFile = Dir
Loop Until Len(xlsFile) = 0
Sheet1.[A3] = i
End Sub