Trap and continue in Loop..
Posted on 2002-04-05
I have a routine that thumbnails an entire directory.
The problem is animated gifs or unsupported file types.
I cannot get this loop to continue if it bombs because of an err.number 481....
There has to be a way to increment and continue onto the next file...I have tried everything I can think of...
Public Sub SaveWholeFolder(sType As String)
For i& = 0 To frmDemo.List1.ListCount - 1
fName$ = frmDemo.List1.List(i&)
'On Error do what?
frmDemo.picHidden.Picture = LoadPicture(fName$)
Call StretchPic(frmDemo.picHidden, frmDemo.picMain)
frmDemo.Caption = i&
x$ = Mid(fName$, InStrRev(fName$, "\") + 1)
xx$ = Mid(x$, 1, InStr(x$, "."))
xx$ = xx$ & sType
Call SavePicture(frmDemo.picMain, App.path & "\Thumbnails\" & xx$)