How To Activate Go Back Button in This Script

rikeshpatel4u

New Member
Joined
Mar 30, 2019
Messages
1
Sub DynamicWebPage()


' here I define elemnts for the loop
Dim sht As Worksheet
Set sht = ThisWorkbook.Sheets("Sheet2")
Dim LastRow As Long
Dim i As Long
LastRow = sht.Cells(sht.Rows.Count, "D").End(xlUp).Row


' here I define Internet Explorer
Dim IE As Object
Dim Doc As HTMLDocument
Set IE = CreateObject("InternetExplorer.Application")


' here I define range for the loop
For i = 2 To LastRow


' here I ask the Internet explorer to be visable & Navigate to value in cell "H"i
IE.Visible = True
IE.navigate "https://www1.incometaxindiaefiling.gov.in/e-FilingGS/Services/AadhaarPreloginStatus.html"


' here I ask the Internet explorer to wait few seconds


Do While IE.Busy
Application.Wait DateAdd("s", 2, Now)


' here I define Object to sendkeys
Dim SHELL_OBJECT
SHELL_OBJECT = "WScript.Shell"
Set objShell = CreateObject(SHELL_OBJECT)




Set Doc = IE.document


'******* From here the macro fill the data from excel table in range into WEB elements******


Doc.getElementById("panNo").Value = sht.Range("D" & i).Value
Doc.getElementById("aadhaarNo").Value = sht.Range("E" & i).Value
Doc.getElementById("aadhaarbtn").Click
IE.Visible = 1
IE.GoBack


Loop


' here I ask to populate column "G"i with "created" string to know that this raw was successfully done
sht.Range("G" & i).Value = "linked"


Next i
MsgBox "Process 100% completed"


End Sub
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top