tags:

views:

25

answers:

1

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 InternetExplorer
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")
A: 

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

Per G