Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 4th, 2006, 07:18 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access an open IE window

Hi,

I want to access an IE window from a set of open IE windows based on the address bar information.

Can anyone help me in this regard?

Thanks

 
Old May 4th, 2006, 07:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 173
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I think this is the sort of thing you mean:

Code:
Sub Test()

Dim SW As SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer

    Set SW = New ShellWindows

    ' Loop through all the shell windows on the desktop
    For Each IE In SW

        ' If its an HTML document = a webpage
        If TypeOf IE.Document Is HTMLDocument Then
            MsgBox IE.LocationName
        End If

    Next IE

    Set SW = Nothing

End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
window.open() ckrajeshvarma ASP.NET 2.0 Professional 5 August 16th, 2006 09:13 AM
Open New Window b_camp Classic ASP Basics 2 May 12th, 2005 01:19 AM
Access is unable to open database window amerk20 Access 1 April 21st, 2005 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.