- ©«¤l
- 967
- ¥DÃD
- 0
- ºëµØ
- 0
- ¿n¤À
- 1001
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN XP
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-11-29
- ³Ì«áµn¿ý
- 2022-5-17
|
¦^´_ 1# eg0802
§Q¥ÎVBA- Sub MergeBook()
- Dim MyPath$, MyName$, wb As Workbook, sh As Worksheet, sht As Worksheet
- Set wb = ThisWorkbook
- MyPath = ThisWorkbook.Path & "\"
- MyName = Dir(MyPath & "*.xls")
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- For Each sh In Sheets
- If sh.Name <> ActiveSheet.Name Then sh.Delete
- Next
- Do While MyName <> ""
- If MyName <> ThisWorkbook.Name Then
- With GetObject(MyPath & MyName)
- For Each sht In .Sheets
- sht.Copy After:=wb.Sheets(wb.Sheets.Count)
- Next
- .Close False
- End With
- End If
- MyName = Dir
- Loop
- Application.DisplayAlerts = True
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X
¦X¨Ö¬¡¶Ã¯.rar (9.64 KB)
|
|