View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ker_01 ker_01 is offline
external usenet poster
 
Posts: 395
Default ID and access currently active web page (in IE6)?

The full sequence of events is that I access the target URL, login, make some
selections that forwards me to a second (secure) website; then I go through
about 4 screens to set up various search parameters and get my results. The
website has built-in security that prevents copy/paste of screen contents, so
I need to use Regex against the page source to grab the data I need. In
addition, to go from page to page, I have to enter/type a visual code for
security purposes.

I'm totally fine with the login process, and it is complex enough that I'd
hate to have to try to do it (text entry, combobox selections, etc) via code
and sendkeys. So, I get to the point where I already have an instance of IE6
open (not opened from Excel) and the problem I have is that I don't know how
to get Excel to find the instance of IE6 and capture the page code, since the
process wasn't started in Excel. I'm thinking something like:

Dim MyBrowser as InternetExplorer6.Instance
Set MyBrowser = InternetExplorer.activewindow
Dim currentpage as string
currentpage = MyBrowser.source
'then use regex to parse out the key data

I appreciate any assistance or code snippets!

Thank you,
Keith

"ron" wrote:

On Jul 6, 12:50 pm, ker_01 wrote:
I googled, but no joy. Using Excel 2003.

I have other code I've used to navigate, open, and parse web pages- but all
from within Excel, it never popped up in IE. However, now I need to parse a
page that I can't open directly from Excel (I have to enter a screen-based
code to go from page to page). So, I'd like to be able to manually navigate
in IE, then run my macro to scrape the key elements from the IE web page and
bring them into my target worksheet range.

Can anyone help me with the syntax to point Excel to the currently active IE
page?

Thank you,
Keith


Keith...You should be able to accomplish this programmatically using
an input box to manually enter the screen-based code. What url do you
start with and where do you want to wind up?..Ron