VBA - IE GetElementByID not working

前端 未结 2 1002
無奈伤痛
無奈伤痛 2021-02-15 14:33

I\'m having some trouble with entering a text in a search box when after I what I think to be the correcet ID tag is. I got the ID from the page\'s source code. I\'ve done this

相关标签:
2条回答
  • 2021-02-15 15:19

    You can try

    Do Until IEexp.readyState = 4
    DoEvents
    Loop
    
    
    
    IEexp.Document.getElementById("username").Value = "Monthly update"
    
    
    IEexp.Document.getElementById("password").Value = FilePth
    
    0 讨论(0)
  • 2021-02-15 15:34

    If you use Set IEexp = New InternetExplorerMedium you don't have to change the settings in your Internet Options. It automatically instantiates the IE object with Medium Integrity Application settings.

    0 讨论(0)
提交回复
热议问题