- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 1# gkld
ActiveSheet '§@¥Î¤¤ªº¤u§@ªí
¬O¬°¹Ï2 ¤¤ ³y¯ÈÃþ«ü¼Æ- Option Explicit
- Sub Ex()
- Dim Ex_Path As String, Ex_File As String, Ex_Date As String, Ex_Wb As Workbook
- Ex_Path = "¸ê®Æ§¨¸ô®|\" '******ק復********
- Ex_File = Dir(Ex_Path & "A112*ALL_1.csv")
- If Ex_File = "" Then
- MsgBox "¨S¦³ A112*ALL_1.csv"
- Exit Sub
- End If
- Application.ScreenUpdating = False
- Do While Ex_File <> ""
- Ex_Date = Replace(Ex_File, "A112", "") '®ø°£ÀɦW¤¤"A112"
- Ex_Date = Replace(Ex_Date, "ALL_1.csv", "") '®ø°£ÀɦW¤¤"ALL_1.csv"
- Ex_Date = DateSerial(Mid(Ex_Date, 1, 4), Mid(Ex_Date, 5, 2), Mid(Ex_Date, 7, 2)) '±a¤J¤é´Á
- With ActiveSheet '§@¥Î¤¤ªº¤u§@ªí
- Set Ex_Wb = Workbooks.Open(Ex_Path & Ex_File) '¶}±Ò A11220070102ALL_1.csv.....
- .Cells(.Rows.Count, "A").End(xlUp).Offset(1) = Ex_Date '¤é´Á¿é¤J
- .Cells(.Rows.Count, "B").End(xlUp).Offset(1) = Ex_Wb.Sheets(1).Range("A:A").Find(.Range("B1"), lookat:=xlWhole).Offset(, 1)
- '**** §@¥Î¤¤ªº¤u§@ªí.Range("B1") ¬°¬d¸ß«ü¼ÆªºÃþ§O *********
- Ex_Wb.Close 'Ãö³¬ A11220070102ALL_1.csv.....
- End With
- Ex_File = Dir '¤U¤@Ó"A112*ALL_1.csv"
- Loop
- Application.ScreenUpdating = True
- MsgBox "OK"
- End Sub
½Æ»s¥N½X |
|