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

[µo°Ý] ½Æ»sÀɮצÜÁU½k¸ô®|

¦^´_ 10# GBKEE

G¤j,

±z»¡ªº¨S¿ù,§Ú¤]§â¥¦ªí®æ¤Æ¤F,¤£ª¾³o¼Ë¬O§_¯à¬Ý±o§ó©úÁA... Macro.A.rar (26.33 KB)

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2019-5-31 05:26 ½s¿è

¦^´_ 11# PJChen
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub EX()
  3.     Dim SF As Object, Source_Folder As String, Target_Folder As String
  4.     Dim Source_File As String, E As Variant, E1 As Variant
  5.     Source_Folder = "W:\Ī¦Ë¦@¥Î\­ÜÀx¦@¥Î"
  6.     Target_Folder = "D:\0_¦Û­qªí³æ\Backup\­ÜÀx¦@¥Î " & Format(Date, "YYYYMMDD")
  7.     If Dir(Target_Folder, vbDirectory) <> "" Then      '¶Ç¦^³o¸ê®Æ§¨¥Ø¿ý
  8.         Set SF = CreateObject("Scripting.FileSystemObject")
  9.         For Each E In SF.GetFolder(Source_Folder)
  10.             For Each E1 In SF.GetFolder(Target_Folder)
  11.                 Source_File = E.Path & "\*.xlsx"
  12.                 If E.Path Like "*¯Z²z³f´«ºâªí" And E1.Path Like "*¯Z²z³f´«ºâªí" Then
  13.                     Source_File = E1.Path & "\*" & Format(Date, "M") & "¤ë*.xlsx"
  14.                 End If
  15.                 SF.CopyFile Source_File, E1.Path
  16.             Next
  17.         Next
  18.     Else
  19.         MsgBox "§ä¨B¨ì " & vbLf & Target_Folder
  20.     End If
  21. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD