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

[µo°Ý] ½Ð°Ý¦p¦óŪ¨ú²ÅéÀɦW¡H

[µo°Ý] ½Ð°Ý¦p¦óŪ¨ú²ÅéÀɦW¡H

¥»©«³Ì«á¥Ñ esperanto ©ó 2011-6-14 11:05 ½s¿è

·Q½Ð°Ý«e½ú­Ì¡G

§Ú·Q¥ÎVBA±N¤@­Ó¸ê®Æ§¨¤ºªºÀɦW¦C¥X¡A
¦ý¹J¨ì²ÅéÀɦW®É¡A·|Åܦ¨?©Î¬OªÅ¥Õ¡A
½Ð°Ý¸Ó¦p¦ó¸Ñ¨M¡H¡H

§Úªºµ{¦¡½X¦p¤U¡G
With ActiveSheet
n = .[A65536].End(xlUp).Row + 1
Range(.Cells(4, 1), .Cells(n, 4)).ClearContents
path1 = CStr(.Range("B1")) & "\"
file1 = Dir(path1): r = 1
i = 4
Do While file1 <> ""
  .Cells(i, 1) = file1
  i = i + 1
  r = r + 1
  file1 = Dir '¨ú±o¤U¤@­ÓÀɦW
Loop
End With
End Sub

¥ýÁÂÁ¦U¦ì¤F¡I

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-6-16 08:25 ½s¿è

¦^´_ 1# esperanto

°ò¥»¤W~
ÁcÅé¨t²Î¤º Ū¨ú ²Åé·|Åܦ¨¶Ã½X..\
¦pªG¬O¤Ö¶qªº¸Ü ¨º«Øij¥Î¤â°Ê§ï¤ñ¸û§Ö...
¦]¬°¥ÎEXCEL VBA ¥hŪ¨úÀÉ®× ·|³y¦¨´XºØ±¡§Î²£¥Í(­Ó¤H¸gÅç)
1.«D¥¿²Î¤å¦r(¯S®íÁcÅé¦r) ¦p 嵵 ³o­Ó¦r¡AVBA·|°±¤î§@·~~~¦b¥¼³]©w¥ô¦ó¸õ¹L¿ù»~ªº±¡ªp¤U
2.¦³ªÅ®æ ¥L¤]¬O¤£·|Ū¨ú~~  ¦p ¤ý¤j   ¤ý¤j  (©d) ¡B ¤ý¤p    ¡B¤ý¤p  (©d) ³o¥|µ§ªº¸Ü  ¨âµ§OK ¨âµ§·|¦³°ÝÃD(¤£¯S©w³]©wªº±¡ªp¤U)

PS ¦pªG¦³Â²Åé¦r  §A¥i¥H¸ÕµÛ+¤@¬q§PÂ_°Ï°ì  ¬Ý¯S®íªº¨º´X­Ó²Åé¦rÀɮתºÀɦW ¬O§_¥i¥HKEYIN ¤JVBA¤º

TOP

To mark15jill :

ÁÂÁ¤j¤jªº¦^ÂСC

©Ò¥HŪ²ÅéÀɦW³o°ÝÃDºâ¬OµL¸ÑÅo¡H

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-6-16 13:54 ½s¿è

¦^´_ 3# esperanto

°ò¥»¤W ¤£³æ²Åé¦r¬OµL¸Ñ~«Ü¦h¯S®í²Å¸¹ ¤]¬OµL¸Ñ~
°£«D¦³ÃB¥~+³]©w©ÎªÌ¬O§PÂ_~~(¤£¦n·N«ä ³o­Ó§Ú¤£·|~~)
¹³¤§«e §Ú¦³¦bªO¤Wµo°Ý¤@¨ÇÀÉ®×·h²¾ªº°ÝÃD¡A«á¨Ó¨Ì¾Ú¬Y¤j¤jªºµ{¦¡½X¥h°õ¦æ·h²¾ªºµ{¦¡¡A·hµÛ·hµÛ»®µMµo²{
¦³®É­Ô ·|µ¹§Ú½}¤u!!!(¨S¬Ý¿ù ¯uªº¬O½}¤u¡AÀɮרS·h§¹´N°±±¼¡A¤]¨S¿ù»~°T®§!!)
µ²ªG ¬d¤Fµ{¦¡½X¤Î¦WºÙ¡A¤~µo²{¥u­n¬O¦³ªÅ®æ¡B²Å¸¹¡B¯S®í¦r¡AVBA¤º¤£©Ó»{ªº¸Ü¡A¤@·§·|¦³°ÝÃD~~

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-6-16 19:47 ½s¿è

¦^´_ 3# esperanto
³o¼Ë´N¯àŪ¨ì²ÅéÀɦW
  1. Sub ²ÅéÀɦW()
  2. Dim fs
  3. Set fos = CreateObject("Scripting.FileSystemObject")
  4. Set fd = fos.getfolder(ThisWorkbook.Path) 'Àɮץؿý
  5. Set fc = fd.Files
  6. For Each fs In fc
  7. r = r + 1
  8. Cells(r, 1) = fs.Name
  9. Next
  10. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

TO Hsieh

¯u¬O¤Ó·PÁ¤F¡I¤£¦ý§iª¾¸Ñ¨M¤èªk¡AÁÙ¯S¦aÀ°§Ú­×§ïµ{¦¡¡C
¨º­ÓÁc²¤¬´«ªºµ{¦¡¤]«Ü¦n¥Î¡I

§Ú·Q¦A½Ð±Ð¤@­Ó°ÝÃD¡G
·í§Ú±N²ÅéÀɦW¦C¦bexcel¤u§@ªí¤¤¡A§Ú­n¦p¦ó±q¤u§@ªí¤¤ªºÀɦW¸ê®Æ¥h§äÀɮסH
¨Ò¦p§Ú¥HHsiehªºµ{¦¡Åª¨ú¨ì²ÅéÀɦW¡G¡u¥t¤@Ïú温·x.mp3¡v¡AÅã¥Ü¦bcells(4,1),
µM«á§Ú·Q¦A¹ï³o­ÓÀɮק@³B²z¡]ex §ó§ïÀɦW¡^¡A¦ý´Nºâ§Ú±qcells(4,1)§ì¸ê®Æ¡A
¥u·|±o¨ì¡u¥t¤@Ïú?·x.mp3¡v³o¼Ëªº¦r¦ê¡A
¾É­P§ÚµLªk§Q¥Î¤u§@ªíªº¸ê®Æ¥h§ä¨ìµwºÐ¤¤ªº³o­ÓÀɮסA
³o¸Ó¦p¦ó¸Ñ¨M©O¡H¡H

TOP

        ÀR«ä¦Û¦b : ¤£©È¨Æ¦h¡A¥u©È¦h¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD