I am getting the "subscript out of range error" in the following code. Can someone tell me what I am doing wrong!
*** error ocurrs here
Any help is appreciated.
Code:
Dim sfile As String
Dim strFileNames() As String
Dim strRowSource As String
Dim intI As Integer
sfile = Dir("C:\Temp\*.jpg", vbNormal)
intI = 0
Do While sfile & "" <> ""
sfile = Dir()
strFileNames(intI) = sfile
Code:
intI = intI + 1
Loop
Any help is appreciated.