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

[µo°Ý] ±q¬Y¸ê®Æ§¨¤¤¡A±NÀɮצWºÙ«Ø¥ß¦bexcel¤¤

[µo°Ý] ±q¬Y¸ê®Æ§¨¤¤¡A±NÀɮצWºÙ«Ø¥ß¦bexcel¤¤

Dear ¤j¤j

          ¦³µL¿ìªk±N¬Y­Ó¸ê®Æ§¨¤¤ªº¼v­µÀÉ(°ÆÀɦW:.wmv©Î¥ô¦ó°ÆÀɦW)¦WºÙ¡A
          1.¨C¤@­Ó¼v­µÀɪº¦WºÙ³£«Ø¥ß¦bexcel¤¤  
             (¦pªG¥i¥H¡A¬O§_¤@­ÓÄæ¦ì¼gÀɮצWºÙ¡B¤@­ÓÄæ¦ì¼g¤W°ÆÀɦWºÙ[ex¡Gexcel ´N¶ñ¤Wexcel¡Bword´N¶ñ¤Wword])
          2.¨C­Ó¦WºÙ«Ø¥ß¶W³sµ²

         
¾Ç²ß¤~¯à´£¤É¦Û¤v

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2014-9-30 13:45 ½s¿è

Dear ¤j¤j
             ªþ¥ó¬O§Úªì½Z¡A¦³³]©wÃþ¦ü«ü©w¸ê®Æ§¨¡A¦b§ì¨ú¸Ó¸ê®Æ§¨¤¤ªºÀɮצWºÙ¡A¦ýµo¥Í¤F°ÝÃD
    ¯à-ÀɮצWºÙ¶×¤J-HH-20140930-001.rar (13.27 KB)
            ¤U­±¬O§Úªºµ{¦¡½X
            ¦b²Ä13¦C  myFileName = Dir(myPath, 0) §ì¨ìªº¬O""¡A©Ò¥H¡A¶]¤£¥X¨Ó
  1. Option Explicit
  2. Private Sub CommandButton1_Click()

  3. Dim myPath As String
  4. Dim myFileName As String
  5. Dim i As Long
  6. Dim K As Integer

  7. With Application.FileDialog(msoFileDialogFolderPicker)
  8.      .Show
  9.   If .ButtonName = "½T©w" Then
  10.     myPath = .SelectedItems(1)
  11.     myFileName = Dir(myPath, 0)
  12.     Do While Len(myFileName) > 0
  13.       Debug.Print myPath & myFileName
  14.       sheet1.Range("B65536").End(xlUp).Offset(1, 0) = myPath        '¸ô®|
  15.       sheet1.Range("C65536").End(xlUp).Offset(1, 0) = myFileName    'ÀɦW
  16.       K = K + 1
  17.       sheet1.Range("A65536").End(xlUp).Offset(1, 0) = K             'No
  18.       myFileName = Dir()
  19.     Loop
  20.   End If
  21. End With


  22. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 2# hugh0620
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub CommandButton1_Click()
  3. Dim myPath As String
  4. Dim K As Integer
  5. Dim F As Object, E As Object
  6. With Application.FileDialog(msoFileDialogFolderPicker)
  7.     'If .ButtonName = "½T©w" Then
  8.     '**¤£ºÞ§A¬O§_«ö¤U½T©wÁä,©Î¬OÃö³¬¹ï¸Üµøµ¡, ** ³o¦æµ{¦¡½X³£¬O¥¿½Tªº ***'
  9.     If .Show = True Then   '¦³«ö¤U½T©wÁä
  10.         myPath = .SelectedItems(1)
  11.         Set F = CreateObject("Scripting.FileSystemObject").GetFolder(myPath).Files
  12.         'FileSystemObject ª«¥ó ¦³´£¨ÑÀɮפº®eªºÄÝ©Ê¥i¥Î
  13.         If F.Count > 0 Then
  14.             Cells.Clear
  15.             K = 5
  16.             Cells(K, "a") = "No"
  17.             Cells(K, "b") = "¸ô®|"
  18.             Cells(K, "c") = "­µÀɮצWºÙ"
  19.             Cells(K, "d") = "Àɮפj¤p"
  20.             Cells(K, "E") = "Àɮ׫¬ºA"
  21.             For Each E In F
  22.                 If E.Type = "MP3 ®æ¦¡Án­µ" Then  '«ü©w§AªºÀɮ׫¬ºA: "¼v­µÀÉ"
  23.                     K = K + 1
  24.                     Cells(K, "a") = K - 5
  25.                     Cells(K, "b") = myPath
  26.                     Cells(K, "c") = E.Name
  27.                     Cells(K, "d") = Format(E.Size / 1024, "#,000 KB")
  28.                     Cells(K, "E") = E.Type
  29.                 End If
  30.             Next
  31.         End If
  32.     End If
  33. End With
  34. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD