PDA

View Full Version : Run IE through VBA



nst1107
07-21-2009, 06:57 PM
I've seen several methods for controlling IE through VBA procedures, but I have yet to get a good handle on any of them. MSDN is just about completely over my head on this topic. What I'd like to be able to do is write a sub that will open an instance of IE, go to a site, and interact with the webpage and a dialog box or two.

Specifically, the page is http://www.geocaching.com/seek/nearest.aspx?state_id=4, and what I'd like the procedure to do is click the button near the bottom of the page that says "Check All", and then click the button that says "Download Waypoints". A dialog box will pop up, and I want the procedure to click "Save", navagate to a specific folder if necessary, rename the file, and click "Save" again. After the save, I want the procedure to click the text on the webpage that says "Next", and repeat the process from "Check All".

There are only 302 downloads for the state of Arkansas, so it's not impossible for me to sit here and manually do each one, but it would be great (and make me look a lot less like a loser) to have a little VBA slave to do it for me.

Is this possible?

I'm sorry I can't provide any started code. I don't even have a clue.

stanl
07-28-2009, 02:37 AM
You are talking about web-scraping. The site appears to require a log-in otherwise the 'button' you referenced is not visible. Since the goal is to download files you are probably better off with HTTP requests rather than trying to control IE. just .02 Stan

nst1107
07-28-2009, 07:20 AM
Thanks for the information. That's a start. I'll do some more research.