Results 1 to 4 of 4

Thread: Looping Through Each Internet Explorer

  1. #1
    Member Rajan_Verma's Avatar
    Join Date
    Sep 2011
    Posts
    81
    Rep Power
    14

    Looping Through Each Internet Explorer

    User will get the URL of All running webBrowser.

    Code:
    Sub LoopThroughEachIEWindow()
    
    'Reference : Microsoft Internet Control
        
        Dim objSh    As New SHDocVw.ShellWindows
        Dim ibR     As SHDocVw.WebBrowser
        For Each ibR In objSh
            Debug.Print ibR.LocationURL
        Next
    End Sub

  2. #2
    Junior Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0
    This is not only give details for the active web browser but also give details of the active / open folders.
    Thanks for sharing this.

  3. #3
    Member Rajan_Verma's Avatar
    Join Date
    Sep 2011
    Posts
    81
    Rep Power
    14
    Quote Originally Posted by Rajan_Verma View Post
    User will get the URL of All running webBrowser.

    Code:
    Sub LoopThroughEachIEWindow()
    
    'Reference : Microsoft Internet Control
        
        Dim objSh    As New SHDocVw.ShellWindows
        Dim ibR     As SHDocVw.WebBrowser
        For Each ibR In objSh
            Debug.Print ibR.LocationURL
        Next
    End Sub
    this code will work with Internet explorer only.

    Thanks

  4. #4
    Member Rajan_Verma's Avatar
    Join Date
    Sep 2011
    Posts
    81
    Rep Power
    14
    Quote Originally Posted by Rajan_Verma View Post
    User will get the URL of All running webBrowser.

    Code:
    Sub LoopThroughEachIEWindow()
    
    'Reference : Microsoft Internet Control
        
        Dim objSh    As New SHDocVw.ShellWindows
        Dim ibR     As SHDocVw.WebBrowser
        For Each ibR In objSh
            Debug.Print ibR.LocationURL
        Next
    End Sub
    this code will work with Internet explorer only.

    Thanks

Similar Threads

  1. VBA Looping Input Range and Output Range
    By Whitley in forum Excel Help
    Replies: 7
    Last Post: 04-25-2013, 09:02 PM
  2. VBA IE Internet Explorer Automation Through ElementID
    By mrmmickle1 in forum Excel Help
    Replies: 3
    Last Post: 01-22-2013, 06:20 AM
  3. Looping through Each Files and Folders
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 0
    Last Post: 04-18-2012, 12:12 AM
  4. VBA - Excel: Disable Internet / Google
    By technicalupload in forum Excel Help
    Replies: 3
    Last Post: 10-06-2011, 09:18 AM

Tags for this Thread

Posting Permissions

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