標題: [發問] VBA DIR 請教 [打印本頁] 作者: adrian_9832 時間: 2020-3-5 21:23 標題: VBA DIR 請教
大大們 我想問問 在版上 找到以下的DIR 語法
Sub file()
abc = ThisWorkbook.Path
Dim myFolder As String, myFile As String
Dim i As Integer
myFolder = abc & "\31931777_20S0514_Del 31931777_2\"
myFile = Dir(myFolder & "*.txt") <--------問題1 能以多條件 例如 *.red or blue.txt 來取得 嗎
i = 1
Do While myFile <> ""
Cells(i, 1).Value = myFile
myFile = Dir()
i = i + 1
Loop