Sub合并当前目录下所有工作簿的全部工作表() Dim MyPath, MyName, AWbName Dim Wb Workbook,WbN String Dim LongDim Num LongDim BOX StringApplication.ScreenUpdati ng FalseMyPath ActiveWorkbook.PathMyName "*.xls")AWbName ActiveWorkbook.NameNum DoWhile MyName SetWb MyName)Num Workbooks(1).ActiveSheet.Cells(.Range("A65536").End(xlUp).Row Left(MyName,Len(MyName) Sheets.CountWb.Sheets(G).UsedRange.Copy .Cells(.Range("A65536").End(xlUp).Row NextWbN Wb.NameWb.Close False End DirLoop Range("A1").Select Application.ScreenUpdati ng TrueMsgBox "共合并了" WbN,vbInformation, "提示" End Sub 操作步骤: 在新建文件夹内新建一个EXCEL 表格 打开新建的EXCEL 空表格,按ALT+F11,选择“插入-模块”