Runtime error 438 while importing data in excel from secured website using VBA

*爱你&永不变心* 提交于 2019-12-02 01:06:16

Try this (TRIED AND TESTED)

Replace

With ieDoc.forms(0)
   .userType.Value = "1"
    .UserId.Value = "rlbdgs"
    .userPassword.Value = "123"
    .submit
End With

with

With ieDoc
    .getElementById("userId").setAttribute "value", "rlbdgs"
    .getElementById("userPassword").setAttribute "value", "123"

    '~~> This will select the 2nd radio button as it is `0` based
    .getElementsByName("userType")(1).Checked = True

    .getElementById("hmode").Click
End With
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!