Dear SirI want to enter data (roll numbers) from excel in site http://rajresults.nic.in/resbserx19.htm and the and extract the data received in excel. I had tried to write the code which is given below but unable to extract percentage or data from site. Please help.
Code:
Private Sub CommandButton1_Click()
Dim IE As ObjectSet IE = CreateObject("InternetExplorer.Application")
IE.navigate "http://rajresults.nic.in/resbserx19.htm"
IE.Visible = True
While IE.busyDoEvents 'wait until IE is done loading page.
Wend
IE.document.all("roll_no").Value = ThisWorkbook.Sheets("Sheet1").Range("B2")
Set doc = IE.document
Do While doc.ReadyState <> "complete": DoEvents: Loop doc.GetElementsByName("B1")(0).Click strVal = IE.document.all("Percentage").Item(0).innerText
ThisWorkbook.Sheets("Sheet1").Range("C2").Value = strVal
End Sub
Last edited by a moderator: