Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks, Tim. I've tried the following code, but get stuck as per comments in code. Any suggestions what I'm doing wrong? Paul ================================================== ================= Private Const HTTP_PATH As String = "http://192.120.13.77/ viewtable.aspx?region=E_AUST&report=int924" Private Const HTTPREQ_SUCCESS As Integer = 200 Private Const BUTTON_AGREE As String = "ctl00_ContentPlaceHolder1_imgAgree" Private Const DROPDOWN_RECENTREPORT As String = "ctl00_ContentPlaceHolder1_dpRecentReport" Sub GetHtmlPage() Dim HttpReq As New MSXML2.XMLHTTP Dim HtmlDoc As New MSHTML.HTMLDocument Dim HtmlBtnAgree As MSHTML.HTMLButtonElement Dim HtmlOpt As MSHTML.HTMLOptionElement HttpReq.Open "GET", HTTP_PATH, False HttpReq.send If HttpReq.Status = HTTPREQ_SUCCESS Then HtmlDoc.body.innerHTML = HttpReq.responseText Set HtmlBtnAgree = HtmlDoc.all(BUTTON_AGREE) Debug.Print TypeName(HtmlBtnAgree) ' Returns HTMLInputElement, appears to work HtmlBtnAgree.Value = True ' Emulate button click Debug.Print HtmlDoc.body.innerHTML ' <<< STILL RETURNING DISCLAIMER PAGE For Each HtmlOpt In HtmlDoc.forms("aspnetForm").Item (DROPDOWN_RECENTREPORT) ' << FAILS, page hasn't loaded Debug.Print HtmlOpt.Text Next HtmlOpt End If End Sub '================================================= ================== |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing Drop down list into new page | Excel Discussion (Misc queries) | |||
How to create a drop down list with different values | New Users to Excel | |||
Drop down list with different values. | Excel Worksheet Functions | |||
Mask Drop Down List values | Excel Discussion (Misc queries) | |||
Clearing the Values in a Drop - Down List | Excel Discussion (Misc queries) |