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

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

¦^´_ 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 : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD