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

[µo°Ý] ½Ð°Ý¦p¦ó¦b"¤å¦r¤è¶ô"¿é¤J±ø¥ó«á¦A¥h·j´M¸ê®Æ

¥»©«³Ì«á¥Ñ »k¥ú°j¯T ©ó 2014-10-2 16:22 ½s¿è

¦^´_ 7# GBKEE


Dear  GBKEE ª©¥D±z¦n¡G

¡@¡@¡@«D±`·PÁ§AÁc¦£¤§¶¡©âªÅÀ°¦£¡C

¡@¡@¡@1. ±z¼gªºµ{¦¡¡A¥i¥H§ì¨ì¤l¸ê®Æ§¨©³¤UªºÀɮסC

¡@¡@¡@2. µ{¦¡°j°éªº¤è¦¡¬O§Ú³Ì®zªº¶µ¥Ø¡A©Ò¥H¬Ý¤£¤ÓÀ´¡A¤£®e©ö§Ú±q¤¤¾Ç²ß¡C

¡@¡@¡@3. ¦³­Ó¦a¤è¤£©ú¥Õ¡A°õ¦æ«á¨Ã¤£·|¨ÌÃöÁä¦r¥h½Æ»sÀɮסA¤Ï¦Ó½Æ»s¸ê®Æ§¨©³¤U¥þ³¡ªºÀɮסC

¡@ªþ¥ó¤¤ªºÀɮ׬O§Ú¥Î Hsieh ª©¥D¤j¤H¡AÀ°§Ú¼gªºµ{¦¡¥h°µ­×§ïªº¡A
¡@
¡@¥Ø«eªº²~ÀV¬O¤£ª¾¹D¡A­n«ç»ò§ïµ{¦¡¤~¯à ·j´M»P½Æ»s¡@¤l¸ê®Æ§¨©³¤UªºÀɮסH

¡@¡´·|³o¼Ë¼g¬O¬°¤F¤é«á¤è«K°µºûÅ@»P­×§ïµ{¦¡½X¡C¦A¦¸ÁÂÁ GBKEE ª©¥D¤j¤j


  1. Private Sub CommandButton1_Click()
  2. DM = "D:\´ú¸Õ¥Î\" '·j´M¥D¸ô®|
  3. ML1 = Range("E3") '·j´MÀɮ׸ê®Æ§¨¥Ø¿ý¤@
  4. ML2 = Range("E5") '·j´MÀɮ׸ê®Æ§¨¥Ø¿ý¤G
  5. ML3 = Range("E7") '·j´MÀÉ®×ÃöÁä¦r
  6. gb = "D:\" & ML3 & "\" '¦sÀɦì¸m
  7. Set fsd = CreateObject("Scripting.FileSystemObject")
  8. fd = DM & ML1 & "\" & ML2 & "\" 'Àɮ׸ê®Æ§¨¦ì¸m
  9. fs = Dir(fd & "*" & ML3 & "*") '´ú¸ÕÃöÁä¦rÀɦW¬O§_¦s¦b
  10.   If fs <> "" Then
  11.      If fsd.folderexists(gb) = False Then fsd.createfolder gb '¦Û³Ð¸ê®Æ§¨¤£¦s¦b«h«Ø¥ß
  12.      fsd.copyfile fd & "*" & ML3 & "*", gb '½Æ»sÀÉ®×
  13.   Else
  14.      Exit Sub  'µ²§ôµ{¦¡
  15.   End If
  16. End Sub
½Æ»s¥N½X

¼Ë¥».rar (10.92 KB)

´ú¸Õ¥Î.rar (10.16 KB)

§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ

TOP

¦^´_ 6# »k¥ú°j¯T
¹ï¸Ü®Ø ¸Õ¸Õ¬Ý
  1. Sub Ex()
  2.     With Application.FileDialog(msoFileDialogFolderPicker) '¶}±Ò¸ê®Æ§¨ªº¹ï¸Ü®Ø
  3.         If .Show = True Then
  4.          If MsgBox(.SelectedItems(1) & "  ¤¤·j´M *" & TextBox3, vbYesNo) = vbYes Then
  5.             If Dir("D:\¦Û³Ð¸ê®Æ§¨", vbDirectory) = "" Then MkDir ("D:\¦Û³Ð¸ê®Æ§¨") '¦Û³Ð¸ê®Æ§¨¤£¦s¦b«h«Ø¥ß
  6.             TextBox1 = .SelectedItems(1)
  7.             °Æµ{¦¡ .SelectedItems(1)
  8.          End If
  9.        End If
  10.     End With
  11. End Sub
  12. Private Sub °Æµ{¦¡(¸ê®Æ§¨ As String)
  13.     Dim Fs As Object, F As Object
  14.     Set Fs = CreateObject("Scripting.FileSystemObject")
  15.     If Dir(¸ê®Æ§¨ & "\*" & TextBox3 & "*") <> "" Then '´ú¸ÕÃöÁä¦rÀɦW¬O§_¦s¦b
  16.         Fs.copyfile ¸ê®Æ§¨ & "\*" & TextBox3 & "*", "D:\¦Û³Ð¸ê®Æ§¨"
  17.     End If
  18.    
  19.     '*** ¦p¸ê®Æ§¨¤U¦³¤l¸ê®Æ§¨ ¦A©I¥s³o°Æ.µ{¦¡ ***
  20.     '©I¥s µ{¦¡ªº°j°é
  21.     For Each F In Fs.GetFolder(¸ê®Æ§¨).SUBFolderS
  22.         Debug.Print F  '¥i¬Ý¤@¤U ¤l¸ê®Æ§¨¦WºÙ
  23.         °Æµ{¦¡ F & ""
  24.     Next
  25. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# Hsieh


Dear Hsieh ª©¥D¡G

¡@¦A½Ð°Ý¦pªG³s¤l¸ê®Æ§¨¡A©³¤UªºÀɮפ]­n¥þ³¡´M§ä½Æ»s¡A

¡@­n¥[¤J¤°»ò«ü¥O? ¥[¦b­þ¤@¦æ ?

¡@ÁÂÁÂ
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ

TOP

¦^´_ 4# Hsieh


Dear Hsieh¡G

¡@¡@¡@¯uªº¥Ñ°J·PÁ§AªºÀ°§U¡A³oÀ°¤F§Ú«Ü¤jªº¦£¡A

¡@¡@¡@¦]¬°§Ú¨S¦³¥ô¦óªº°ò¦¡A©Ò¥H­è°_¨B¹ï§Ú³oªì¾ÇªÌ¨Ó»¡«Ü¨¯­W¡A

¡@¡@¡@§Ú·|§V¤Oªº¡A¨ì®ÉÁٽЦU¦ì°ª¤â»P¡@Hsieh¡@¤j¤j¦h¦h¶O¤ß¤F¡AÁÂÁ¡ã
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ

TOP

¦^´_ 3# »k¥ú°j¯T
¸Õ¸Õ¬Ý
  1. Private Sub CommandButton1_Click()
  2. Set fsd = CreateObject("Scripting.FileSystemObject")
  3. fd = "\\D1502111\¼È¦s°Ï\" & TextBox1 & "\" & TextBox2 & "\" 'Àɮ׸ê®Æ§¨¦ì¸m
  4. fs = Dir(fd & "*" & TextBox3 & "*") '´ú¸ÕÃöÁä¦rÀɦW¬O§_¦s¦b
  5. If fs <> "" Then
  6.    If fsd.folderexists("D:\¦Û³Ð¸ê®Æ§¨") = False Then fsd.createfolder "D:\¦Û³Ð¸ê®Æ§¨" '¦Û³Ð¸ê®Æ§¨¤£¦s¦b«h«Ø¥ß
  7.    fsd.copyfile fd & "*" & TextBox3 & "*", "D:\¦Û³Ð¸ê®Æ§¨" '½Æ»sÀÉ®×
  8. Else
  9.    Exit Sub
  10. End If
  11. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

³Â·Ð¦U¦ìÀ°À°¦£¤F¡A¦pªGExcelµ{¦¡¡AµLªk¹F¨ì§Ú·Q­nªº®ÄªG¡A
¤]½Ð¦n¤ß§i¶D§Ú¤@¤U¡Aµ{¦¡¿ì¤£¨ì¡AÅý§Ú¦­ÂI¦º¤ß©ñ±ó¡D¡D¡D¡D¡D
ÁÂÁ¦U¦ì¼ö¤ßªº°ª¤â¤j¤j¡A¤Q¤À·PÁ¡A¦Ê¤À·PÁ¡A¤d¤À·PÁ¡A¸U¤À·PÁ¡A¤d¸U¤À·PÁ¡A
§Ú¤]¬O¬Ý¨ì¦¹ºô¯¸¡A¦³«Ü¦h¼ö¤ß¥B¤£¨D¦^³øªº°ª¤â¤j¤j¦b¡A
¨Ã·Q­nÅý¦¹ºô¯¸¥ÃÄò¸gÀç¡A¤]¥Î¦æ°Êªí¥Ü§Úªº¸Û·N¡A
¤£­nÅý§Úªº¨D§U¤å¡A¨I²_«ô°U¡ã
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ

TOP

¦³¨S¦³°ª¤âÀ°À°§Ú,«ô°U,¦]¬°VBA§Ú¤£¬O«Ü¼ô,
§Ú³£¬O¬Ý§O¤Hªºµ{¦¡¦b¤gªk·Ò¿û......
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD