Hello
I'm trying to input address and it doesn't work
I'm using this site
https://www.latlong.net/
Please advise why am I getting an error "Object required"
The error occurred when macro is executing
Thank you for your help
I'm trying to input address and it doesn't work
I'm using this site
https://www.latlong.net/
Please advise why am I getting an error "Object required"
The error occurred when macro is executing
Code:
IE.Document.getElementById("Es2259").Value = address
Code:
Sub Automate_IE_Load_Page()'This will load a webpage in IE
Dim i As Long
Dim URL As String
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
Dim brt As Variant
'LastRow = Worksheets("tax").Cells(Worksheets("tax").Rows.Count, "C").End(xlUp).row
For i = 2 To 3438
address = Worksheets("GEO_LOCATION").Cells(i, 2).Value
'Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
'Set IE.Visible = True to make IE visible, or False for IE to run in the background
IE.Visible = True
'Define URL
URL = "https://www.latlong.net/"
'Navigate to URL
IE.Navigate URL
' Statusbar let's user know website is loading
Application.StatusBar = URL & " is loading. Please wait..."
' Wait while IE loading...
'IE ReadyState = 4 signifies the webpage has loaded (the first loop is set to avoid inadvertently skipping over the second loop)
Do While IE.readyState = 4: DoEvents: Loop 'Do While
Do Until IE.readyState = 4: DoEvents: Loop 'Do Until
'Webpage Loaded
Application.StatusBar = i
IE.Document.getElementById("Es2259").Value = address
IE.Document.getElementById("latlngspan") = Worksheets("GEO_LOCATION").Cells(i, 5)
Next i
End Sub
Thank you for your help