Option Explicit
Sub dirtst()
Dim f As String, i As Long
f = Dir("C:\Users\i\Downloads\")
Cells(1, "A") = f
i = 2
Do While f <> ""
f = Dir
Cells(i, "A") = f
i = i + 1
Loop
End Sub
f = Dir(ThisWorkbook.Path & "\*.html") 只返回当前目录下xlsx文件。
大佬啊!
先码为敬。
做个日常笔记而已啦,毕竟抄来的工具,哈哈哈。。