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

¨D¤¤Â_ÀÉ®×Ápµ²¥\¯àµ{¦¡½X

¨D¤¤Â_ÀÉ®×Ápµ²¥\¯àµ{¦¡½X

¦U¦ì¦n,¦]§Ú­n±N¤@¨ÇÀɮצX¨Ö,¦ý¹J¨ì·í¤¤¦³¤@Àɮ׳]¦³³sµ²¥\¯à®É,¦p¦ó§Q¥ÎVBAµ{¦¡½X±N¨ä¤¤Â_,Ä~Äò§¹¦¨ÀɮצX¨Ö¤u§@?·PÁ¦U¦ìªº½ç±Ð

¦^´_ 1# lai.k.h


    ­Y¤¤Â_³sµ²«h·|¥u³Ñ¤U­È¡A¤½¦¡´N·|¤£¨£
©Î¬O§A­n¶}±ÒÀɮ׮ɤ£­n§ó·s³sµ²
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

«D±`·PÁÂHsiehª©¥Dªº¦^ÂÐ,¨ä¹ê§Ú³Ìªñ­è¦b¾Ç²ßVBA,¤]§Q¥Î¤@¨Ç¾÷·|¾Ç²ß¼gVBA,°w¹ï³o­Ó°ÝÃD³Ì¥D­n¬O§Ú¼g¤F¤@µ{¦¡½X¦p¤U,¬O§Æ±æ±NÀɮ׶}±Ò«á¶i¦æ½Æ»sªº¤u§@,¦ý¬O¦]¦³¨ÇÀɮצ³³]©w³sµ²,©Ò¥H¥¨¶°run¨ì¨º­ÓÀɮ׮ɧY·|¸õ¥X¦p¤Uªº¹ï¸Ü¤è¶ô(¦¹¬¡­¶³¡¥]§t¤@­Ó©Î¦h­ÓµLªk§ó·sªº³sµ²),¨º»ò¸Ó¦p¦ó¦bµ{¦¡½X¤¤­×§ï,¨Ï¥¨¶°¯àª½±µ°õ¦æ§¹²¦,ÁÂÁÂ.
Sub ¦C¥XÀÉ®×()
ChDir "C:\Excel ½m²ß\20110126"
file1 = Dir("C:\Excel ½m²ß\20110126\*.xls")
R = 1
Do While file1 <> ""
   Workbooks.Open file1
   Sheets("ñ¬ù©±©ú²Ó").Range("A33").Select
   Rows("2:2").AutoFilter
   Rows("3:" & Rows.Count).EntireRow.Hidden = False
   Selection.EntireColumn.Hidden = False
   ActiveSheet.Range(Selection, Selection.End(xlDown)).Select
   Set s = Selection.Areas
   For Each s In Selection.Areas
   
        s.Range("A3").CurrentRegion.Offset(1).Copy _
        Workbooks("Book1.xls").Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Cells(2)

    Next
     R = R + 1
     Workbooks(file1).Close 0
     file1 = Dir '¨ú±o¤U¤@­ÓÀɦW
     
Loop
Workbooks("Book1.xls").Sheets("Sheet1").Rows("2:2").AutoFilter
End Sub
[img][/img]

TOP

Workbooks.Open file1, 0
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsiehª©¥DÀ³¸Ó¥i¥H¤F,«D±`·PÁ±z¼·ªÅ¦^ÂÐ

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD