Code:'access all bmp files within a folder Private Sub Command1_Click() Dim stFile As String Dim stDir As String Dim myArr() Dim i As Integer stDir = "C:\Test\" stFile = Dir$(stDir & "*.bmp") Do While stFile <> "" ReDim Preserve myArr(i) 'if you want the path as well it would be 'myarr(i) = stdir & stfile myArr(i) = stFile i = i + 1 stFile = Dir Loop End Sub




Reply With Quote