G
Guest
I have the following:
opath = InputBox("Enter path for current month data", cmpath)
If Right(opath, 1) <> "\" Then
opath = opath & "\"
End If
oname = Dir(opath & "*.xls")
Debug.Print opath
icount = 0
Do While oname <> ""
icount = icount + 1
Debug.Print icount, oname
If icount > 100 Then Exit Do
Loop
I have at least 10 xls workbooks in the folder, but it's only seeing the
first and not looping to the remainder. Any idea why?
opath = InputBox("Enter path for current month data", cmpath)
If Right(opath, 1) <> "\" Then
opath = opath & "\"
End If
oname = Dir(opath & "*.xls")
Debug.Print opath
icount = 0
Do While oname <> ""
icount = icount + 1
Debug.Print icount, oname
If icount > 100 Then Exit Do
Loop
I have at least 10 xls workbooks in the folder, but it's only seeing the
first and not looping to the remainder. Any idea why?