开发者

How do you reference the HTMLSelect object from VBA?

开发者 https://www.devze.com 2023-01-08 05:15 出处:网络
I am trying to reference the HTMLSelect object in VBA. Assuming I have a form on the html page and a select control named LB. I can\'t figure out why I get an error message using the code below.

I am trying to reference the HTMLSelect object in VBA. Assuming I have a form on the html page and a select control named LB. I can't figure out why I get an error message using the code below.

Dim ieApp As InternetExplorer
Dim ieSelect As HTMLSelect
Dim iePage as HTMLDocument

Set ieApp = New Intern开发者_运维问答etExplorer
ieApp.Visible = True
ieApp.navigate "C:\formA.html"

 Do Until ieApp.readyState = READYSTATE_COMPLETE
    Loop


Application.Wait (Now() + TimeValue("00:00:05"))

Set iePage = ieApp.document
Set ieSelect = iePage.forms(0).Item("LB")


Hm, not sure, but have you the runat="server" on the in formA.html?

0

精彩评论

暂无评论...
验证码 换一张
取 消