Hi experts,
my task is the following:
I am to download files from a login-protected web site (in fact, it is a data provider).
I'd like to be logged in already, use the corresponding Internet Explorer window/tab, and have the macro run through a list of codes that would have to be entered on the web page.
Difficulties and open questions:
1. How can I use an already opened IE window, so that I do not have to go through the log in procedure for every code I download data from? All the examples about IE automation I've seen in VBA included creating a new IE object and navigating to the target site - that's what I'd like to avoid for speed and complexity reasons. Let's assume the page is already loaded and logged in.
2. For some codes, no data will exist and IE will display an error message (as a dialog box with an OK button). The macro must account for that in the sense that it pushes ok, and goes on with the next code.
3. If the code request is successful, there is a button to be clicked, which triggers the download of the desired file through a Javascript. The file is to be saved (not opened), filename should correspond to the code that was used for the request.
I'd be thankful if you could indicate how to solve a few (or all ;) of these issues, as well as warn me if you think that some of these steps are unsolvable with Excel VBA.
Best,
Robofix