+ Reply to Thread
Results 1 to 4 of 4

Get a reference to the currently running IE ?

  1. #1
    quartz
    Guest

    Get a reference to the currently running IE ?

    I know that to create a new instance of IE, I can use:

    Dim oIE As InternetExplorer
    Set oIE = New InternetExplorer

    How does one get a reference to the current instance? I tried "GetObject"
    but I must be doing something wrong. I won't post since it fails anyway.

    Thanks in advance.

  2. #2
    CodeSponge
    Guest

    Re: Get a reference to the currently running IE ?

    What type of Ref?

    if u want the value of a form field or something like that its
    oIE.Document.formName("fieldName").value

    if u want the body source to parse then try
    sVar = oIE.Document.Body.innerhtml


    etc...


  3. #3
    quartz
    Guest

    Re: Get a reference to the currently running IE ?

    I thought my original post was clear, but I meant to ref the currently
    running IE application itself...can you help me out?

    "CodeSponge" wrote:

    > What type of Ref?
    >
    > if u want the value of a form field or something like that its
    > oIE.Document.formName("fieldName").value
    >
    > if u want the body source to parse then try
    > sVar = oIE.Document.Body.innerhtml
    >
    >
    > etc...
    >
    >


  4. #4
    CodeSponge
    Guest

    Re: Get a reference to the currently running IE ?

    O, ic, sorry about that.
    you could try something like the following


    Public Declare Function FindWindow& Lib "user32" Alias "FindWindowA"
    (ByVal lpClassName$, ByVal lpWindowName$)

    and then call it like this

    hMessageBox = FindWindow("#32770", "WindowName")

    I this is what I do when I want to grab a msg box and kill it.
    I'm not sure what the lpClassName for IE would be tho
    hope it helps.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1