html - not able to pick value from webpage and get it into excel -
i new vba, want data webpage excel sheet.. have written code visiting web page, input value , clicking on submit button. on clicking submit button, next webpage comes.. want emailid webpage excel sheet.. please help
the code have written follows:
sub emailforcform() dim ie internetexplorer dim html htmldocument set ie = new internetexplorer ie.visible = true ie.navigate "https://registration.apct.gov.in/ctdportal/search/emailsearch.aspx" while ie.readystate <> readystate_complete application.statusbar = "trying connect" doevents loop set html = ie.document ie.document.all("ctl00$contentplaceholder1$txttin").value = "28740213505" ie.document.all("ctl00$contentplaceholder1$butget").click range("c4").value = ie.document.all("contentplaceholder1_updatepnl").value end sub
this works me...
sub test() set ie = new internetexplorer ie.visible = true ie.navigate "https://registration.apct.gov.in/ctdportal/search/emailsearch.aspx" application.statusbar = "trying connect" until not ie.busy , ie.readystate = 4 doevents loop ie.document.all("ctl00$contentplaceholder1$txttin").value = "28740213505" ie.document.all("ctl00$contentplaceholder1$butget").click application.statusbar = "preparing retrieve email id" until not ie.busy , ie.readystate = 4 doevents loop range("c4").value = ie.document.getelementsbytagname("tbody")(7).getelementsbytagname("tr")(1).getelementsbytagname("td")(1).innertext end sub
Comments
Post a Comment