7,764
社区成员
发帖
与我相关
我的任务
分享
Private Sub Command1_Click()
Dim FileName As String
Dim filepath As String
Dim strFile() As String
Dim n As Long
Dim i As Long
filepath = App.Path & "\Pic\"
FileName = Dir(filepath & "Sc*.Dps")
n = 0
While FileName <> ""
DoEvents
n = n + 1
ReDim Preserve strFile(n)
strFile(n) = FileName
FileName = Dir()
Wend
List1.Clear
Text1.Text = n
For i = 1 To n
List1.AddItem strFile(i)
Next
End Sub