How can I loop the script 1000 times to get the data in different cells and get URL value from different cells?
Private Sub CommandButton1_Click()
Dim ie As InternetExplorer
Dim ht As HTMLDocument
Set ie = New InternetExplorer
ie.Visible = True
ie.navigate Workbooks("FINAL-1").Worksheets("sheet1").Range("A2").Value
Do While ie.readyState <> READYSTATE_COMPLETE
Loop
Set ht = ie.document
Workbooks("FINAL-1").Worksheets("sheet1").Range("C").Value = ht.getElementById("addr1").Value
'Workbooks("FINAL-1").Worksheets("sheet1").Range("C2").Value = ht.getElementById("fullName").Value
'Workbooks("FINAL-1").Worksheets("sheet1").Range("d2").Value = ht.getElementById("addr1").Value
Workbooks("FINAL-1").Worksheets("sheet1").Range("D").Value = ht.getElementById("dob").Value
Workbooks("FINAL-1").Worksheets("sheet1").Range("E").Value = ht.getElementById("applyDte").Value
Workbooks("FINAL-1").Worksheets("sheet1").Range("B").Value = ht.getElementById("idNo").Value
'Workbooks("FINAL-1").Worksheets("sheet1").Range("G2").Value = ht.getElementById("genderMtdtId").Value
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
CodePudding user response:
Set ie = New InternetExplorer
ie.Visible = True
ie.navigate Workbooks("FINAL-1").Worksheets("sheet1").Range("A2").Value
Do While ie.readyState <> READYSTATE_COMPLETE
Loop