Hello all
I am attempting some code that will utilize Excel, go out to Google Alerts, add an alert, go back to the spreadsheet, offset to the row below, capture this string, and add the next alert (loop through the list in the column).. I have not yet completed the loop part, as I am stuck on the first input box?
Looking at the element that I am trying to manipulate, I get the following information
'input type="text" placeholder="Create an alert about..." aria-label="Create an alert about..." class tabindex="0"'
So, I do not have a name to work with?
I have the following code, which of course throws an error:
Sub GoogleAlerts()
Dim IE As Object
Dim Alert As String
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
Sheets("Sheet1").Select
Range("A2").Select
Do Until ActiveCell.Value = ""
Alert=ActiveCell.Value
ActiveCell.Offset (1,0).Select
IE.navigate "https://www.google.com/alerts"
Application.Wait Now + TimeValue("00:00:02")
IE.document.all("query_div").Value = Alert
Loop
End Sub
Any help would be appreciated!
I am attempting some code that will utilize Excel, go out to Google Alerts, add an alert, go back to the spreadsheet, offset to the row below, capture this string, and add the next alert (loop through the list in the column).. I have not yet completed the loop part, as I am stuck on the first input box?
Looking at the element that I am trying to manipulate, I get the following information
'input type="text" placeholder="Create an alert about..." aria-label="Create an alert about..." class tabindex="0"'
So, I do not have a name to work with?
I have the following code, which of course throws an error:
Sub GoogleAlerts()
Dim IE As Object
Dim Alert As String
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
Sheets("Sheet1").Select
Range("A2").Select
Do Until ActiveCell.Value = ""
Alert=ActiveCell.Value
ActiveCell.Offset (1,0).Select
IE.navigate "https://www.google.com/alerts"
Application.Wait Now + TimeValue("00:00:02")
IE.document.all("query_div").Value = Alert
Loop
End Sub
Any help would be appreciated!
Last edited: