How to automate login for QueryTable when querying web page...
Posted on 2004-11-18
I am currently using VBA to run a querytable refresh that updates a set of fields. The querytable goes to the URL (which contains a CGI script that actually gets the data and builds the webpage) and pulls one table from that web page. I would like to automate it so that I can simply have the Task Scheduler kick off Excel at 5AM which through code in the Workbook_Open() event runs a refresh of the data.
Unfortunately, the web site the data pulls from requires an ID and password to be submitted prior to receiving the first batch of data. The flow works like this...
1. Submit URL
2. Receive standard IE ID and Password dialog box
3. Enter ID and password and click OK
4. Web page is generated, table culled, fields populated
5. Repeat as many queries as you want... the session maintains that ID and password until you close Excel
Does anyone know how to automate step 2/3? It's not a web form that's filled out, it's just the ID/PWD dialog box from Internet Explorer that has the ID and Password already pre-populated.