IEを最前面に表示する 

'強制的に最前面にさせる
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hWnd As Long) As Long
'最小化されているか調べる
Private Declare Function IsIconic Lib "user32" (ByVal hWnd As Long) As Long
'元のサイズに戻す
Private Declare Function ShowWindowAsync Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long

'サンプル2.3_最前面表示
Public Sub showForeground()
    'IEを格納する変数(オブジェクト型)
    Dim ie As Object
    'IEを起動
    Set ie = CreateObject("InternetExplorer.Application")
    ie.Visible = True
    ie.Navigate2 ("http://www.google.co.jp/")

    '最小化されている場合は元に戻す(9=RESTORE:最小化前の状態)
    If IsIconic(ie.hWnd) Then
        ShowWindowAsync ie.hWnd, &H9
    End If
    '最前面に表示
    SetForegroundWindow (ie.hWnd)
End Sub
最前面表示の処理は、InternetExplorerに限らないウィンドウ操作のひとつ。Windows32APIとして、SetForegroundWindow関数、IsIconic関数、ShowWindowAsync関数を利用する。
一番基本的な処理はこのSetForegroundWindowを使う部分。
SetForegroundWindow (ie.hWnd)
引数として渡されたウィンドウハンドルを持つウィンドウを最前面に表示させる処理。IEオブジェクトのhWnd属性で、InternetExplorerウィンドウのハンドルを取得することができる。
ただし、これだけでは不完全。ウィンドウが最小化されている場合にも復元して最前面表示させるために、SetForegroundWindowの前に以下の処理を行っておく。
If IsIconic(ie.hWnd) Then
    ShowWindowAsync ie.hWnd, &H9
End If
IsIconicは引数のウィンドウが最小化されているかを確認する関数。最小化されている場合は、ShowWindowAsync関数によってウィンドウの状態を変更する。第1引数が操作対象のウィンドウハンドル、第2引数が変更後の状態。&H9は「最小化される前の状態」を示している。