标签:
Private strFiles(20)
Private Sub GetFiles(ByVal strFolder As String, ByVal ty As String) ‘ 获取文件列表
If iFiles = 0 Then
Erase strFiles
End If
If iFiles > 20 Then
Exit Sub
End If
Dim
FilePaths, FilePath As String
FilePaths = strFolder & "\*."
& ty
FilePath = Dir(FilePaths)
‘Dir返回匹配*.*的第一个文件名
Do While FilePath <> ""
strFiles(iFiles) = strFolder & "\" & FilePath
iFiles = iFiles + 1
FilePath = Dir
‘再一次调用Dir,得到其它匹配*.*的文件名
Loop
End Sub
标签:
原文地址:http://www.cnblogs.com/lbnnbs/p/4785002.html