vb.net - COMException was unhandled Visual Basic 2010 error -
i following error message when running code;
private sub submit_click(byval sender system.object, byval e system.eventargs) handles submit.click 'determine text inpu' dim ieapp shdocvw.internetexplorer dim iedoc object dim preurl string dim localfilename string dim errcode long ieapp = createobject("internetexplorer.application") ieapp .visible = false .navigate("http://mfreport.paho.org/barr/default.asp") while .busy : application.doevents() : loop **while .readystate <> 4** : application.doevents() : loop .document.forms("rptform") .jobname.value = job.text .usrname.value = user.text .jobdate.value = dtp.text .submit() .action.click() end while not cbool(instr(1, .document.url, "mfreport.paho.org/barr/default.asp")) application.doevents() loop while .busy : application.doevents() : loop while .readystate <> 3 : application.doevents() : loop end iedoc = ieapp.document = 0 iedoc.links.length - 1 dim sfullimageurl string = "http://mfreport.paho.org/barr/jobreceived/" & iedoc.links(i).nameprop dim slocalfilename string = "i:\sys_systems\support\test\" & iedoc.links(i).nameprop dim mywebclient new webclient call mywebclient.downloadfile(sfullimageurl, slocalfilename) next if errcode = 0 msgbox("download has completed") else msgbox("an error has occurred") end if ieapp = nothing end sub
when running in debbug following error message comexception unhandled rpc server unavailable. exception hresult: 0x800706ba
Comments
Post a Comment