문제

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!!

도움이 되었습니까?

해결책

This clicks the "GO" button for me

Selection.Copy
IE.Document.getElementByID("typeAheadTextInput").Value = ActiveCell.Value
IE.Document.getElementByID("typeAheadFormSubmit").Click
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top