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

[µo°Ý] ·j´M½Æ»s°ÝÃD

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2012-3-19 10:36 ½s¿è

¦^´_ 3# imzues


    §Úªº¼gªk¸òH¤j¤j¤£¤Ó¤@¼Ë
    ¬O¤ñ¸ûÄÝ©ó¯B°Êªº¸ô®|~ ´£¨Ñµ¹§A°Ñ¦Ò~
  1. Private Sub CommandButton1_Click()
  2. '===== ¿ï¾Ü¦sªº¸ô®|=======
  3. With Application.FileDialog(msoFileDialogFolderPicker)
  4.     If .Show = 0 Then Exit Sub
  5.     patch = .SelectedItems(1)
  6.     Application.DefaultFilePath = patch
  7. End With
  8. '=====================
  9. '=====ÀÉ®×­n¤ñ¹ïªº¸ô®|======
  10. With Application.FileDialog(msoFileDialogFolderPicker)
  11.     If .Show = 0 Then Exit Sub
  12.     fd = .SelectedItems(1)
  13.     If .ButtonName = "½T©w" Then
  14.     fs = Dir(fd & "\*.xls")
  15.         Do Until fs = ""
  16.            sa = Left(fs, 9)
  17.            Set fk = Sheet1.Range("A:A").Find(sa)
  18.            If Not fk Is Nothing Then
  19.             With Workbooks.Open(fs)
  20.             .SaveAs Application.DefaultFilePath & "\" & fs
  21.             .Close
  22.             End With
  23.            End If
  24.            fs = Dir
  25.         Loop
  26.     End If
  27. End With
  28. '=============================
  29. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD