ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] EXCEL ÀɮצX¨Ö

[µo°Ý] EXCEL ÀɮצX¨Ö

½Ð°Ý¤@¤U  ¦p¦ó§â¦h­ÓexcelÀÉ®× ¦X¨Ö¦¨1­Ó¬¡­¶Ã¯¸Ì­±¦³¦h­Ó¤u§@ªí?
Jason

¦^´_ 1# eg0802

§Q¥ÎVBA
  1. Sub MergeBook()
  2. Dim MyPath$, MyName$, wb As Workbook, sh As Worksheet, sht As Worksheet
  3. Set wb = ThisWorkbook
  4. MyPath = ThisWorkbook.Path & "\"
  5. MyName = Dir(MyPath & "*.xls")
  6. Application.ScreenUpdating = False
  7. Application.DisplayAlerts = False
  8. For Each sh In Sheets
  9.   If sh.Name <> ActiveSheet.Name Then sh.Delete
  10. Next
  11. Do While MyName <> ""
  12.   If MyName <> ThisWorkbook.Name Then
  13.      With GetObject(MyPath & MyName)
  14.        For Each sht In .Sheets
  15.            sht.Copy After:=wb.Sheets(wb.Sheets.Count)
  16.        Next
  17.        .Close False
  18.      End With
  19.   End If
  20.   MyName = Dir
  21. Loop
  22. Application.DisplayAlerts = True
  23. Application.ScreenUpdating = True
  24. End Sub
½Æ»s¥N½X
¦X¨Ö¬¡­¶Ã¯.rar (9.64 KB)

TOP

¦^´_ 2# register313


    r¤j ¤p§Ì¤£¤~....§¹¥þ¤£·|¥Îvba.....¯à§_±Ð§Ú¦p¦ó¨Ï¥Î?
Jason

TOP

¦^´_ 2# register313


    R¤j ¦A½Ð±Ð¤@¤U¡A§Ú­è´ú¸Õ¤@¤U§AªºÀɮסA§Ú§âÀɮשñ¨ì®à­±¡Aµo²{´X¥G§â©Ò¦³ªºEXCEL ³£¦X¨Ö¦A¤@°_¡A¬Ý¤F¤@¤U¦X¨Öªº¤º®e¡A³£¬O®à­±¤WªºEXCELÀɮסA§Ú·Q§Ú©ú¥Õ¸Ó¦p¦ó¨Ï¥Î¦¹¥\¯à¤F¡A¦A¦¸·PÁÂ!!!!

¯à§_¦A½Ð±Ð¤@­Ó°ÝÃD  ¦pªG§Ú¦X¨Ö«á¡A²Î¤@­×§ï¦n¸ê®Æ¡A­n§â¬¡­¶Ã¯¦A¤À´²¬°­Ó§OÀɨӸӦp¦ó°µ©O?
Jason

TOP

¦^´_ 2# register313
½Ð°Ý, ¥i§_¸ÑÄÀ¤@¤U³o¬q:

.MyPath = ThisWorkbook.Path & "\"
.MyName = Dir(MyPath & "*.xls")
-----------------------------------------
³o­Óµ{¦¡½Xªº¥Î·N, ¬O¦b¨ú±o ¥Ø«e¤u§@¸ô®|¤U ªº "²Ä¤@­Ó excel ÀÉ®×"ªº §¹¾ã¸ô®|»P ¦WºÙ¶Ü?

TOP

¦^´_ 5# alumi

¥¿½T

TOP

³Ìªñ³Q¤½¥qªº¸ê®Æ·d±oÀY©ü¸£µÈ
¬Ý¨ì³o­Ó¯uªºÅý§Ú¤S¾Ç¨ì¤F«Ü¦h~
·PÁ¨C¦ì¥ý¶iªº¤À¨É

TOP

Æg,¶W¯Å¤è«K ¦n¥Î

TOP

¨º¦pªG¬O§â¦h­ÓÀɮצX¨Ö¦b¦P¤@­Ó¬¡­¶Ã¯¸Ì­±©O  ¤£­n¤À«Ü¦h­Ó¤u§@ªí  ¥u­n¤@­Ó

TOP

¦^´_ 2# register313

ÁÂÁ§A´£¨Ñ¦n¤u¨ã

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD