Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scanning all open IE Browser windows for a specific Title

Status
Not open for further replies.

iftikharqureshi

Programmer
Jul 16, 2002
4
US
Hi [sadeyes]

How can I scan already opened IE Browser windows for the one with specific Title?

Thanks !!!

 
You can use the following code to return a handle to the window if you know the caption, this will only work for Internet explorer windows though. If you want to find any window use vbNullString instead of the IEFrame string.

Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long

Public Function IEWindowHandle(strcaption As String) As Long
WindowHandle = FindWindow("IEFrame", strcaption)
End Function

Public Function AnyWindowHandle(strcaption As String) As Long
WindowHandle = FindWindow(vbNullString, strcaption)
End Function


hope it helps

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top