I have entered Roll Nos in B2, B3, B4 and B5 (1706571, 1706572, 1706573, 1706574) and I want their percentages to be entered in column C2, C3, C4 and C5 respectively for which i have written a vba code. But this code is only showing value for cell B2 and not for rest data, moreover percentage shown is not entered in C2. Please help.
I am using excel 2007
Code written by me is
Private Sub CommandButton1_Click()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "http://rajresults.nic.in/resbserx19.htm"
IE.Visible = True
While IE.busy
DoEvents '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
End Sub
Please help to resolve the issue
I am using excel 2007
Code written by me is
Private Sub CommandButton1_Click()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "http://rajresults.nic.in/resbserx19.htm"
IE.Visible = True
While IE.busy
DoEvents '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
End Sub
Please help to resolve the issue