Question

I am trying to create a macro that goes to this URL (http://www.waterstones.com/waterstonesweb/browse/kindle/), copy & paste from an excel into the search form and clicks the button "Go". I have managed to do everything but the last step ("Go"). I don't know why this is not working. Could you please help me out?

This is my code:

Selection.Copy
IE.Document.getElementByID("typeAheadTextInput").Value = ActiveCell.Value

Set htmlDoc = IE.Document
Set htmlColl = htmlDoc.getElementsbyTagname("button")

Set htmlColl = IE.Document.getElementsbyTagname("button")
For Each htmlbutton In htmlColl
If htmlbutton.Type = "submit" Then
htmlbutton.Click
Exit For
End If
Next htmlbutton

Thanks in advance!!

Was it helpful?

Solution

This clicks the "GO" button for me

Selection.Copy
IE.Document.getElementByID("typeAheadTextInput").Value = ActiveCell.Value
IE.Document.getElementByID("typeAheadFormSubmit").Click
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top