Sub合并当前目录下所有工作簿的全部工作表() Dim MyPath, MyName, AWbName Dim Wb Workbook,WbN StringDim LongDim Num LongDim BOX StringApplication.ScreenUpdating 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.ScreenUpdating TrueMsgBox "共合并了" WbN,vbInfo rmation, "提示" End Sub 操作步骤: 在新建文件夹内新建一个E XCEL 表格 格,按ALT+F11,选择“插入-模块”