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

[µo°Ý] ¤£¦PÀɮ׸ê®Æ·J¾ã

[µo°Ý] ¤£¦PÀɮ׸ê®Æ·J¾ã

½Ð°Ýexcel¦³¿ìªk°µ¡A¤£¦PÀɮ׸ê®Æ·J¾ã¶Ü??
¨Ò¡G§Úªº¤@­ÓexcelÀɮצWºÙ¬°10¤ë¡A¥t¥~¦³¤@­Ó¸ê®Æ§¨(¸ê®Æ§¨¦WºÙ¬°10¤ë)¸Ì¦³500­ÓEXCELÀɮסAÀɮצWºÙ¬°001~500¡A½Ð°Ý¦³¿ìªk§â10¤ë¸ê®Æ§¨¸ÌªºÀɮסA
¤À§O§âAP7¡BAP10¡BAP12¡BG7¡BG12³o5­ÓÄæ¦ì¤À§O·J¾ã¨ì10¤ë³o­ÓÀɮ׸̪ºA2¡BB2¡BC2¡BD2¡BE2¶Ü???

¸ê®Æ·J¾ã.rar (10.31 KB)

¥»©«³Ì«á¥Ñ et5323 ©ó 2010-12-1 16:42 ½s¿è

³t«×¦³点ºC!
¥Ñ¤_两©¤¨t统ªº®tÉÝ,With .Sheets("¼Ò»s")¤¤"¼Ò»s"两个¦r§A­n¦bVBE¤¤­«·s输¤@¹M:
®à­±.rar (25.32 KB)

TOP

¦^´_ 1# 0939875756
  1. Sub ex()
  2. Dim Ar(), fd$, fs$, s%
  3. fd = "D:\10¤ë\" '§ó§ï¦¨§Aªº10¤ë¸ê®Æ§¨¥Ø¿ý
  4. fs = Dir(fd & "*.xls")
  5. Do Until fs = ""
  6. With Workbooks.Open(fd & fs)
  7.    With .Sheets("¼Ò»s")
  8.    ReDim Preserve Ar(s)
  9.       Ar(s) = Array(.[AP7].Value, .[AP10].Value, .[AP12].Value, .[G7].Value, .[G12].Value)
  10.       s = s + 1
  11.    End With
  12.    .Close 0
  13. End With
  14. fs = Dir
  15. Loop
  16. [A2].Resize(s, 5).Value = Application.Transpose(Application.Transpose(Ar))
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# Hsieh

¦^Hsieh¤j¤j¡A§Úª½±µ¥Î±z¼¶¼gªºvba¡A­×§ï¤@¨Ç¸ê®Æ¡Aµ²ªG¥X²{°õ¦æ¶¥¬q¿ù»~

µM«á§Ú«ö¤U°»¿ù´N¥X²{¤U¹Ï

½Ð°Ý³o¬O¤°»ò­ì¦]©O??

TOP

fdÅܼƳ̫᭱¤Ö¤F\
"C:\Document and Setting\E\®à­±\³ø§iÀÉ\"
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

³o­Ó­è¦n¬O§Ú©Ò·Q§äªº½d¥»¡AÁÂÁÂHsieh¦Ñ®v

·Pı¦b±z¨­¤W¾Ç²ß¤£¤Ö..

TOP

¯u¬O¤@­Ó smart ªº°µªk, ­n¬O§Ú¤]¬O¤@­Ó¤@­ÓÀÉ®×°µ¶×¤Jªº°Ê§@.. Thanks, Hsieh
Homeman

TOP

«D±`·PÁÂHsieh¤j¤j
³o¤]¬O±`¥Îªº³B²zÀÉ®×
©Ò¥H­n¸g±`¨Ó½×¾Â³ø¨ì
100 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 3# Hsieh


    H¤j¤j~
   ­Y¨Ï¥ÎApplication.FileDialog(msoFileDialogFolderPicker)
   ¬O¤£¬O§ó²Å¦X¨Ï¥ÎªÌ¾Þ§@~
   ´N¤£·|³Q³]©w¦º¸ê®Æ§¨ªº¸ô®|~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

Hª©¶W±j¡A§Ú¤§«e¼g¹LÃþ¦üªºcode¤£¹L§Ú¼g±o¶Wªø~~~«¢«¢¡I
¨º§Ú´N¤£¦b³oÃä¥á¤H²{²´¤F¡A¤£¹L¨p¤H¦³¤@­Ó¤p¤pªº·Qªk
¦pªG¥Î  ThisWorkbook.Path  ¨ÓŪ¨úÀɮ׸ô®|ªº¸Ü·|¤£·|¦n¤@ÂI¡H
¦]¬°excelªºÀÉ®×±`±`³Qcopy¨Ócopy¥h¡A³o¼ËµL½×Àɮ׳Qcopy¨ì­þ¸Ì
³£¥i¥H¥¿±`¨Ï¥Î

«eÃD¬O©ñ¦b¦P¤@­Ó¸ê®Æ§¨°Õ~~:D

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD