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

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

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

½Ð°Ý­n¦p¦ó¼g¤~¯à¹F¨ì§Ú­nªº®ÄªG?

1. §Ú·Q­n¦b¥H¤U¸ô®|·j´M§Ú­nªº¸ê®Æ¡@\\D1502111\¼È¦s°Ï\
¡@¦ý¸ê®Æ§¨¦³´X¤d­Ó¡A¬G§Ú¥Î¤F¡i¤å¦r¤è¶ô1¡j»P¡i¤å¦r¤è¶ô2¡j¡i¤å¦r¤è¶ô3¡jÅý¨Ï¥ÎªÌ¥i¥H¦Û¦æ¿é¤J±ø¥ó

2.§Æ±æ¥i¥H¹F¨ì«ü©w¸ô®|¡G\\D1502111\¼È¦s°Ï\¸ê®Æ§¨¤@(¤å¦r¤è¶ô¤º®e1)\¸ê®Æ§¨¤G(¤å¦r¤è¶ô¤º®e2)\

3.«ö°õ¦æ«á¡A¥i¥H¨Ì¡i·j´MªºÃöÁä¦r(¤å¦r¤è¶ô¤º®e3)¡j¥h·j´M¡A
¡@D¼Ñ©³¤U¦Û°Ê«Ø¥ß¤@­Ó¸ê®Æ§¨¨Ì¡i·j´MªºÃöÁä¦r(¤å¦r¤è¶ô¤º®e3)¡j¬°©R¦W¤è¦¡¡A
¡@¨Ã±N·j´M¨ìªº¡A¥þ³¡Àɮ׽ƻs¨ìD¼Ñ©³¤U¦Û°Ê³Ð«Øªº¸ê®Æ§¨¡C

³Â·Ð¦U¦ì°ª¤âÀ°À°§Ú¤F¡AÁÂÁ¡ã

¦U¦¡¤u§@¬yµ{.rar (12.58 KB)

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

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

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

¦^´_ 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

¦^´_ 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

¦^´_ 4# Hsieh


Dear Hsieh ª©¥D¡G

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

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

¡@ÁÂÁÂ
§Ú«Ü²Â,©Ò¥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

¥»©«³Ì«á¥Ñ »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

¦^´_ 8# »k¥ú°j¯T
   
3. ¦³­Ó¦a¤è¤£©ú¥Õ¡A°õ¦æ«á¨Ã¤£·|¨ÌÃöÁä¦r¥h½Æ»sÀɮסA¤Ï¦Ó½Æ»s¸ê®Æ§¨©³¤U¥þ³¡ªºÀɮסC
  1. 10.fs = Dir(fd & "*" & ML3 & "*") '´ú¸ÕÃöÁä¦rÀɦW¬O§_¦s¦b
  2. 11.  If fs <> "" Then    '³o¸Ì§PÂ_¦³ÃöÁä¦rÀɦWªºÀÉ®×
  3. '*** ¤£·|½Æ»s¸ê®Æ§¨©³¤U¥þ³¡ªºÀÉ®× ****
½Æ»s¥N½X
ML3 = Range("E7") '·j´MÀÉ®×ÃöÁä¦r
·|¬ORange("E7")¤¤¨S¦³¦r¦ê,???³y¦¨ªº¶Ü?
  1. Option Explicit
  2. '¼Ò²Õ¤WºÝªº Dim («Å§iÅܼƬ°³o¼Ò²Õªº¨p¥ÎÅܼÆ),¶È³o¼Ò²Õªºµ{§Ç¥i¨Ï¥Î
  3. Dim gb As String, fsd As Object, ML3 As String
  4. Private Sub CommandButton1_Click()
  5. 'µ{§Ç¤¤ªº Dim («Å§iÅܼƬ°³oµ{§Çªº¨p¥ÎÅܼÆ,¶È³oµ{§Ç¤¤¥i¨Ï¥Î)
  6. Dim fd As String, dm As String, ML1 As String, ML2 As String
  7.     dm = "D:\´ú¸Õ¥Î\" '·j´M¥D¸ô®|
  8.     ML1 = Range("E3") '·j´MÀɮ׸ê®Æ§¨¥Ø¿ý¤@
  9.     ML2 = Range("E5") '·j´MÀɮ׸ê®Æ§¨¥Ø¿ý¤G
  10.     ML3 = Range("E7") '·j´MÀÉ®×ÃöÁä¦r
  11.     gb = "D:\" & ML3 & "\" '¦sÀɦì¸m
  12.     Set fsd = CreateObject("Scripting.FileSystemObject")
  13.     fd = dm & ML1 & "\" & ML2 & "\" 'Àɮ׸ê®Æ§¨¦ì¸m
  14.     If fsd.folderexists(gb) = False Then fsd.createfolder gb '¦Û³Ð¸ê®Æ§¨¤£¦s¦b«h«Ø¥ß
  15.     °Æµ{¦¡ fd
  16. End Sub
  17. Private Sub °Æµ{¦¡(¸ê®Æ§¨ As String)
  18.     Dim F As Object
  19.     Debug.Print ¸ê®Æ§¨  '¥i¬Ý¤@¤U ¤l¸ê®Æ§¨¦WºÙ
  20.     If Dir(¸ê®Æ§¨ & "\*" & ML3 & "*") <> "" Then '´ú¸ÕÃöÁä¦rÀɦW¬O§_¦s¦b
  21.         fsd.copyfile ¸ê®Æ§¨ & "\*" & ML3 & "*", gb
  22.     End If
  23.     '*** ¦p¸ê®Æ§¨¤U¦³¤l¸ê®Æ§¨ ¦A©I¥s³o°Æ.µ{¦¡ ***
  24.     '©I¥s µ{¦¡ªº°j°é
  25.     For Each F In fsd.GetFolder(¸ê®Æ§¨).SUBFolderS
  26.         °Æµ{¦¡ F & ""
  27.     Next
  28. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 9# GBKEE


Dear  GBKEE ª©¥D¤j¤j¡G

¡@ÁÂÁ±z¶O¤ßÀ°¦£¡A¦hÁ« GBKEE §A »P Hsieh ¤j¤j¡A¹©¤O¬Û§U¡A¦A¦¸ÁÂÁ±z­Ì¤F¡ã

4.gif (3.65 KB)

4.gif

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

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD