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

[Âà¶K] VBAªº¼g§@§Þ¥©»P¼W¶i®Ä¯à

¦^´_ 22# skybbs

®ÄªG¤@¼Ëªü
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

½Ð±Ð¤@¤Uª©¤j¡A·í§Úªºµ{¦¡»Ý­n°Ñ¦Ò¦n´X­ÓexcelÀɮתº¤º®e®É¡A§Ú¥H«eªº°µªk´N¬Oworksheets("data.xls")....Range(xxx)³o¼Ë¨ú±o©Î§ó·s¸ê®Æ¡A¥i¬O·í¸ê®Æ¤º®eÃe¤j®É¡A³t«×Åܪº¦nºC¦nºC¡A´Nºâ¬Oµ{¦¡¤º³¡³Ð³y¤@­Ó°}¦C§â¸ê®Æ¥ýŪ¶i¨Ó¡A¤]¬O±o­±Á{¨º¬q½wºCªºÅª¨ú®É¶¡¡C
½Ð°ÝVBA¤¤¬O¤£¬O¦³¬Æ»ò¥¿³W°µªk¥i¥H¸Ñ¨M¤j¶qÀx¦s®æ¸ê®Æ¦s¨úªº°ÝÃD©O¡H¦b³o¸Ì³Â·Ð¤@¤Uª©¤j¡AÁÂÁ¡I

TOP

¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 26# cchaha_captain
¸Õ¸Õ¤U¦Cµ{¦¡
¦b¶}±Òªº©Ò¦³¬¡­¶Ã¯¤¤,±N°£¤F§@¥Î¤¤¬¡­¶Ã¯ (ActiveWorkbook) , ¤§¥~ªºSheets(1).UsedRange ,¦¬¶°¨ì§@¥Î¤¤¬¡­¶Ã¯¤¤ªºActiveSheet
  1. Sub Ex()
  2.     Dim Book As Workbook, Rng(1 To 2) As Range
  3.     With ActiveWorkbook.ActiveSheet
  4.         Set Rng(1) = .Range("A" & Rows.Count).End(xlUp)
  5.         For Each Book In Workbooks
  6.             If Book.Name <> .Parent.Name Then
  7.                 Set Rng(2) = Book.Sheets(1).UsedRange
  8.                 Rng(1).Resize(Rng(2).Rows.Count, Rng(2).Columns.Count) = Rng(2).Value
  9.                 Set Rng(1) = .Range("A" & Rows.Count).End(xlUp).Offset(1)
  10.             End If
  11.         Next
  12.     End With
  13. End Sub
½Æ»s¥N½X

TOP

¦n¤å+1,¨ü¯q»á¦h

TOP

§Ú¤F¸Ñ·N«ä¤F¡A¦ý§Ú»Ý­n·Q¤@¤U¨Ó¬Ý¬Ý«ç»ò°µ¡A
ÁÂÁÂHsieh»PGBKEE¨â¦ì¤j­ô¡C

TOP

§Ú¥¿¦b¾Ç²ß«ç»òÁY¤p°O¾ÐÅ骺®ö¶O¡A¯u¬O¤@½g¦n¤å³¹¡C

TOP

¯uªº¥i¥H¬Ù¤U«Ü¦hªº©U§£«ü¥O..Thanks
Homeman

TOP

³o¬O¤@½g¦n¤å³¹,ı±o¨ü¯q¨}¦h,ÁÂÁÂ

TOP

­è¤Jªù¾Ç²ß¡A§V¤O¾Ç²ß¤¤¡AÁÂÁ¤j¤jºë´ïªº¸Ñ»¡!!
marklu

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD