Option Explicit
Private Declare Function BringWindowToTop Lib "user32" _
(ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
'nécessite d'activer la référence "Microsoft Internet Controls"
Dim IE As New InternetExplorer
Dim winShell As New ShellWindows
Dim x As Long
On Error Resume Next
For Each IE In winShell
If IE.LocationURL = "[I]Ce lien n'existe plus[/I]" Then
x = IE.hwnd
Exit For
End If
Next IE
BringWindowToTop x
ShowWindow x, SW_SHOWNORMAL
End Sub