form.submit (PUT) via XMLHTTP
Hi I am trying to automate data downloads into Excel from a webpage. In the browser I can only get the data I want if I select a checkbox. As soon as the checkbox is clicked, the webpage reloads with the right data, and this is what I am trying to import into Excel via XMLHTTP.
The code related to the checkbox is:
<form method="post" name="tsOptions">
...
<input type="checkbox" name="allRecs" onclick='form.submit();'>
...
</form>
The ... contain some html stuff and further controls like radiobuttons. Anyway, I know how to load the website into Excel VBA as is before the checkbox is selected. Now how do I implement this PUT/submit.form() thing?
the VBA code so far is:
Set oHttp = CreateObject("MSXML2.XMLHTTP")
oHttp.Open "GET", "http://...?option1=...&option2=...", False
oHttp.send
a = oHttp.responseText 'a contains source code of website
Thanks!
|