- ©«¤l
- 57
- ¥DÃD
- 36
- ºëµØ
- 0
- ¿n¤À
- 94
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2014-9-10
- ³Ì«áµn¿ý
- 2024-8-13
|
¤j®a¦n
¥Ø«e°w¹ï¤j¶qÀɦWקï
§Ú¤w¸g¥i¥H±N¯S©w¥Ø¿ý¤UªºÀɮצWºÙ§ì¨ìÄæ¦ìAÄ椺
¦Ó±µ¤U¨Ó¤H¤u±NBÄæ¦ì¹ïÀ³ªº·s¦WºÙ¶ñ¤J«á
»ÝnÅýµ{¦¡¦Û¤v¥hקïÀɮצWºÙ¬°·s¦WºÙ
·Q½Ð°Ý¤j®a³o¬O§_¦³¥i°Ñ¦Òªº¤è¦¡¨Ó³B²z
¦³ÂI§ì¤£µÛÀYºü
ÁÂÁÂ- Sub listfiles()
- Dim oFSO As Object
- Dim oFolder As Object
- Dim oFile As Object
- Dim i As Integer
- Worksheets.Add().Name = "listfile" 'add new sheet and name to listfle
- Set oFSO = CreateObject("Scripting.FileSystemObject")
- Set oFolder = oFSO.GetFolder("D:\Desktop\New folder")
- Cells(1, 1) = "Existing File Name"
- Cells(1, 2) = "New File Name"
- i = 2
- For Each oFile In oFolder.Files
- Cells(i, 1) = oFile.Name 'file name
- i = i + 1
- Next oFile
- End Sub
½Æ»s¥N½X |
|