Try this:
Code:
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function DestroyWindow 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
Const WM_CLOSE = &H10

Private Sub Command1_Click()
    Dim hApp As Long
    hApp = FindWindow("IEFrame", vbNullString)
    PostMessage hApp, WM_CLOSE, 0, 0
    DestroyWindow hApp
End Sub