嘗試了下面的代碼以下URL Scripture look up。請如何將下拉值從WEB
更改爲RV1909
?VBA IE更改下拉值
Dim Doc As HTMLDocument
Set Doc = IEApp.document
TestV2 = ""
TestV3 = ""
TestV2 = Doc.getElementsByClassName("app-list text-list")(0).innerText
Debug.Print "4b of 5: " & TestV2
IEApp.Doc.getElementsByClassName("app-list text-list").selectedIndex = 1
IEApp.Doc.getElementsByClassName("app-list text-list").FireEvent ("onchange")
TestV3 = Doc.getElementsByClassName("app-list text-list")(0).innerText
Debug.Print "4c of 5: " & TestV3
從其他職位
試過許多方法,下面不工作:
IEApp.Doc.getElementsByClassName("app-list text-list")(0).innerHTML = "RV1909"
這裏是Chrome檢查的截圖:
謝謝您的解決方案。 –