+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] VBA To Get URL From Active Internet Explorer Window

  1. #1
    Registered User
    Join Date
    09-07-2011
    Location
    Sacramento
    MS-Off Ver
    Excel 2007
    Posts
    37

    [SOLVED] VBA To Get URL From Active Internet Explorer Window

    I am a novice at VBA and am looking for some code that will allow me to extract the URL from the current active (last opened?) Internet Explorer window.

    Assumptions to consider: 1) There may be mulitple IE windows open, I need the URL from the last one opened which in my case will be the current active IE window, 2) The active window will not have any tabs open - just a single window with one URL, 3) I may also have several Windows Explorer windows open which should be ignored, 4) if it helps, the stacking of all windows on my machine would be top: Excel application where the code will be, second: IE window which has the URL of interest, rest: Outlook, other IE, windows explorer, etc.

    I have searched quite a bit, and found many code snippets that will get URLs for ALL open IE windows, but I have not seen anything that will get the URL from the active window. Any help would be greatly appreciated.
    Last edited by Filibuster; 02-25-2015 at 05:51 PM.

  2. #2
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: VBA To Get URL From Active Internet Explorer Window

    Perhaps some windows API would be of use here? e.g.

    Please Login or Register  to view this content.
    This gets you the handle to the active window
    Please consider adding a * if I helped.

  3. #3
    Registered User
    Join Date
    09-07-2011
    Location
    Sacramento
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: VBA To Get URL From Active Internet Explorer Window

    Thanks Brendan. The API is exactly what I was looking for.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Control Internet Explorer Window - Already Opened
    By guster09 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2014, 04:26 PM
  2. [SOLVED] How to toggle focus between INTERNET explorer window and WINDOWS explorer window using VBA
    By tnuis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2013, 03:29 PM
  3. referencing new internet explorer window
    By gaurav.ibs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2013, 10:54 AM
  4. Detecting Pop Up Window in Internet Explorer
    By rlee12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2013, 01:25 PM
  5. control internet explorer popup window from excel
    By rbradshaw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2011, 03:09 PM

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