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

[µo°Ý] ÀɦW¤£¦P¦p¦ó§PÂ_

¦^´_ 10# cowww


    ³o¼Ë¦^´_¥Nªí¨S°ÝÃD§a!ÁÂÁ¤@°_¾Ç²ß
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 6# ­ã´£³¡ªL

«D±`·PÁ­㴣³¡ªL¤j¤jªº¸Ñ´b

§Ú²×©ó¬ÝÀ´­ã´£³¡ªL¤j¤j´£¨Ñªº»yªk¤F
¥H¤U¬O§Úªº»{ª¾¡A¦p¦³¿ù»~ÁٽЦU¦ì¤j¤j«ü±Ð
³o¬q»yªk¬O²¤Æ«á­±"Cells.Copy" & "Close"ªº¼gªk
«e­±±N¤£¦PªºÀɦW(¤£ºÞ"¨C¤é¼Ò¨ã²§°Ê.xlsx"«e­±¦³¨S¦³ªÅ®æ©Î_)³£³]©w¬°Set xBook¡A³o¼Ë«á­±ªº°õ¦æ³£¥u­n¼g¦¨xBook+........´N¦n
Dim T As String, B As String, i As Integer, xBook As Workbook
T = "\\shl-group.com\dept\MFMG\B.¦U²Õ¸ê®Æ (Team inform)\E.¥ÍºÞ²Õ (PPC group)\X.¦Û°Ê¤Æ¤u¨ã(¤Å§R)\¼Ò¨ã²§°Ê-¤»ºÖ(«æ¥ó1.9±M¥Î)\"
For i = 0 To 10
   B = Format(Date - i, "yyyy.mm.dd")
   If Dir(T & B & "_¨C¤é¼Ò¨ã²§°Ê.xlsx") <> "" Then
      Set xBook = Workbooks.Open(T & B & "_¨C¤é¼Ò¨ã²§°Ê.xlsx", ReadOnly:=True)
      Exit For
      
   ElseIf Dir(T & B & " ¨C¤é¼Ò¨ã²§°Ê.xlsx") <> "" Then
      Set xBook = Workbooks.Open(T & B & " ¨C¤é¼Ò¨ã²§°Ê.xlsx", ReadOnly:=True)
      Exit For
   End If
   
Next
If xBook Is Nothing Then MsgBox "§ä¤£¨ì¥Ø¼ÐÀÉ®×": Exit Sub
End If
xBook.Sheets("LF").Columns("A:AG").Cells.Copy
' ~ do something ~
xBook.Close 0

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD