ok, guys.. i got a wierd bug, i can't figure out what i got wrong here..
maybe some one can point it out for me, what i did wrong!
please do not post the corrections. just confirm the place or point me at the correct errorhandler.
my app loads a list of files in a list box, and then
is suppose to download them from varies locations.
it loaded them in the list .
so here's my code.
with all the error handlers in, it points to this "err12"
i highlighted the coding.
maybe some one can point it out for me, what i did wrong!
please do not post the corrections. just confirm the place or point me at the correct errorhandler.
my app loads a list of files in a list box, and then
is suppose to download them from varies locations.
it loaded them in the list .
so here's my code.
with all the error handlers in, it points to this "err12"
i highlighted the coding.
Code:
Private Sub cmd_down_Click()
Dim af As String
Dim ad As String
Check1.Visible = False
Check2.Visible = False
label5.Visible = False
'list - main
ad = Inet1.OpenURL("http://www.xxxxxxxxxx.com/yyyyyyyyyy/upd/s_dwnl1.oxa", icString)
On Error GoTo err3
Label6.Caption = Label6.Caption & " ..OK "
Close #1
Open App.Path & "\lst.dat" For Output As #1
Print #1, ad
Close #1
Open App.Path & "\lst.dat" For Input As #1
Input #1, itm1, itm2, itm3, itm4
List1.AddItem itm1
Close #1
If itm2 = "" Then
Else
List1.AddItem itm2
End If
If itm3 = "" Then
Else
List1.AddItem itm3
End If
If itm4 = "" Then
Else
List1.AddItem itm4
End If
Label8.Caption = Label8.Caption & " ..OK "
Kill App.Path & "\lst.dat"
'list - secondary
ad = Inet1.OpenURL("http://www.xxxxxxxxx.ccc/yyyyyy/upd/s_dwnl2.oxa", icString)
On Error GoTo err3
Label7.Caption = Label7.Caption & " ..OK "
Close #1
On Error GoTo err2
Open App.Path & "\lst.dat" For Output As #1
Print #1, ad
Close #1
Open App.Path & "\lst.dat" For Input As #1
Input #1, itm1, itm2, itm3, itm4
List2.AddItem itm1
Close #1
If itm2 = "" Then
Else
List2.AddItem itm2
End If
If itm3 = "" Then
Else
List2.AddItem itm3
End If
If itm4 = "" Then
Else
List2.AddItem itm4
End If
On Error GoTo err4
Label9.Caption = Label9.Caption & " ..OK "
Kill App.Path & "\lst.dat"
cmd_down.Enabled = False
cmd_down.Visible = False
On Error GoTo err12
af = Inet1.OpenURL("http://www.yyyyyyyyyy.yyy/vv/aaa/sss/local/roo/" & List1.List(0), icString)
On Error GoTo err14
Label12.Caption = List1.ListCount & " File(s) Remaining..." ' shows how many are in the list
Label13.Caption = List2.ListCount & " File(s) Remaining..."
Label14.Caption = " Change Directory"
On Error GoTo err15
downlo.Visible = True
Label16.Caption = Inet1.URL
On Error GoTo err8
ad = Inet1.OpenURL("http://xxxxxxxxxxxxx.com/aaa/bbb/iiii/local/roo/" & List1.List(0), icString)
On Error GoTo err9
vn.Text = Inet1.URL
Exit Sub
Err: MsgBox "Error : 024 - Unable To Download Segment", vbCritical + vbOKOnly, "Download Error : 024"
Exit Sub
err2: MsgBox "Error : 025 - Unable To Download Primary List", vbCritical + vbOKOnly, "Download Failed :0 25"
Exit Sub
err3: MsgBox "Error : 026 - Unable To Download Secondary List", vbCritical + vbOKOnly, "Download Failed : 026"
Exit Sub
err4: MsgBox "Error : 029 - List Populations Error", vbCritical + vbOKOnly, "Population Error : 29"
Exit Sub
err8: MsgBox "Critical Application Error", vbCritical + vbSystemModal + vbOKOnly, "Applaction Error"
Exit Sub
err9: MsgBox "Error : 005 - Host Refused Connection "
Exit Sub
err12: MsgBox "Error : 012 - URL Error"
Exit Sub
err15: MsgBox "Error : 214 - Request Denied"
Exit Sub
err14: MsgBox "Error : 014 - File Allcation Error"
Exit Sub
End Sub