我正在尝试创建一个转到此网址的宏(http://www.waterstones.com/waterstonesweb/browse/kindle/),copy&从Excel中粘贴到搜索表单中,然后单击“Go”按钮。除了最后一步(“Go”),我已经成功完成了所有工作。我不知道为什么这不起作用。你能帮帮我吗?
这是我的代码:
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
提前致谢!!
答案 0 :(得分:0)
点击“GO”按钮
Selection.Copy
IE.Document.getElementByID("typeAheadTextInput").Value = ActiveCell.Value
IE.Document.getElementByID("typeAheadFormSubmit").Click