-
i would like to choose a directory of images
and then have my program show them one after
the other, kind of like a slideshow..
the part i haven't figured out is to load the
images into an array from a chosen directory.
all help appreciated in advance,
thankx
-
Ok here you go. All you need to do is have a loop using the Dir function.
Code:
Dim strPicArray() As String
Private Sub getPics2()
Dim strFile As String
Dim lCount As Long
'get a file back from Dir, if there is one.
'You can change the *.* to *.bmp or whatever to
'only return picture files
strFile = Dir$("*.*")
'while we have a file
Do While strFile <> ""
'redim the array
ReDim Preserve strPicArray(lCount) As String
strPicArray(lCount) = strFile
lCount = lCount + 1
#ask for the next file from Dir
strFile = Dir
Loop
End Sub