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

[µo°Ý] Ãö³¬¨t²Î´£¥Ü

[µo°Ý] Ãö³¬¨t²Î´£¥Ü

½Ð°Ý½×¾Âªº¤j¤j­Ì
§Ú¦³¼g¤@¬qÃö³¬´£¥Üªº»yªk¡A¦ý¬O¨C¦¸¶}±Ò¬Y­ÓÀÉ®×®ÉÁÙ¬O·|¥X²{"§ó·s³sµ²"ªº´£¥Ü
¦ý¬O¨º­ÓÀɮ׬O¨ä¥¦³æ¦ìªº¡A©Ò¥H§ÚµLªk¹ï¨º­ÓÀÉ®×°µ¥ô¦óªº³]©w
½Ð°Ý©³¤Uªº»yªk­n¦p¦ó­×§ï¤~¥i¥HÃö³¬©Ò¦³ªº¨t²Î´£¥Ü

'VBA ¥N½X¹B¦æ®É¸T¥Î«Ì¹õ§ó·s
Application.ScreenUpdating = False

'Ãö³¬¨t²Î´£¥Ü
Application.DisplayAlerts = False

'¶}±Ò¤»´T²§°Êªí
'«Å§iÅܼÆ(T,B)¬O¦r¦êÅܼÆ,i¬Oµu¾ã¼Æ
On Error Resume Next '¹J¨ì¿ù»~Ä~Äò°õ¦æ¤U¤@¦æ«ü¥O
Dim T As String
Dim i As Integer

'¥OT³o¦r¦êÅܼƬO "¸ê®Æ§¨¦ì§}\"
T = "\\shl-group.com\dept\MFMG\B.¦U²Õ¸ê®Æ (Team inform)\E.¥ÍºÞ²Õ (PPC group)\D.¥Í²£¬ÛÃö\2.¨C¤é¼Ò¨ã²§°Ê\¼Ò¨ã²§°Ê-¤»ºÖ\"

'³]¶¶°j°éi±q0 ¨ì15
For i = 0 To 15

   '¥OB³o¦r¦êÅܼƬO ¤µ¤Ñ¤é´Á´î±¼iÅܼƫ᪺¤é´ÁÂà´«¦¨¦r¦ê
   '¦r¦ê:4½X¦~2½X¤ë2½X¤é¤¤¶¡¥["."²Å¸¹
    Dim B As String
    B = Format(Date - i, "yyyy.mm.dd")
   
    ' «Ø¥ßT & B ¨C¤é¼Ò¨ã²§°Ê.xlsx¦ì§}
    ' ÀˬdT & B ¨C¤é¼Ò¨ã²§°Ê.xlsx¬O§_¦s¦b
    ' °ßŪ¶}±ÒT & B ¨C¤é¼Ò¨ã²§°Ê.xlsx¤å¥ó
    ' §ä¨ì¤å¥ó«á¸õ¥X
    Dim filePath1 As String
    filePath1 = T & B & " ¨C¤é¼Ò¨ã²§°Ê.xlsx"
    If Dir(filePath1) <> "" Then
        Workbooks.Open fileName:=filePath1, ReadOnly:=True
        Exit For
    End If
   
    ' «Ø¥ßT & B¨C¤é¼Ò¨ã²§°Ê.xlsx¦ì§}
    ' ÀˬdT & B¨C¤é¼Ò¨ã²§°Ê.xlsx¬O§_¦s¦b
    ' °ßŪ¶}±ÒT & B¨C¤é¼Ò¨ã²§°Ê.xlsx¤å¥ó
    ' §ä¨ì¤å¥ó«á¸õ¥X
    Dim filePath2 As String
    filePath2 = T & B & "¨C¤é¼Ò¨ã²§°Ê.xlsx"
    If Dir(filePath2) <> "" Then '
        Workbooks.Open fileName:=filePath2, ReadOnly:=True
        Exit For
    End If
        
    ' «Ø¥ßT & B¨C¤é¼Ò¨ã²§°Ê.xlsx¦ì§}
    ' ÀˬdT & B¨C¤é¼Ò¨ã²§°Ê.xlsx¬O§_¦s¦b
    ' °ßŪ¶}±ÒT & B¨C¤é¼Ò¨ã²§°Ê.xlsx¤å¥ó
    ' §ä¨ì¤å¥ó«á¸õ¥X
    Dim filePath3 As String
    filePath3 = T & B & "¨C¤é¼Ò¨ã²§°Ê_New.xlsx"
    If Dir(filePath3) <> "" Then '
        Workbooks.Open fileName:=filePath3, ReadOnly:=True
        Exit For
    End If
Next i

On Error GoTo 0 'µ²§ô¿ù»~Ä~Äò°õ¦æ

'·í¤W­z°j°é¶]§¹¤FÁ٧䤣¨ì·Q­nªº¦ì§}»PÀɦWÀÉ®×!
'´N¸õ¥X´£¥Üµ¡,Åã¥Ü16¤Ñ°Ï¶¡¤é´Á¨S¦³²Å¦XªºÀÉ®×
'³Ì«áµ²§ôµ{¦¡°õ¦æ
If i = 16 Then
    MsgBox "§ä¤£¨ì " & Date & " ~ " & Date - 15 & " ÀÉ®×"
End If

'²M°£¿z¿ï
ActiveSheet.AutoFilterMode = False

¦^´_ 1# cowww

Workbooks.Open fileName:=filePath1, ReadOnly:=True, UpdateLinks:=0
³o¤£ª¾¹D¬O¤£¬O§A­nªº¡C

TOP

¦^´_ 2# Quake

«D±`·PÁ¹p¯«¤§Âñ¤j¤jªº¸Ñ´b

³o½T¹ê¬O§Ú­nªºµª®×

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD