Try this one...

Public Declare Function CloseWindow Lib "user32" Alias "CloseWindow" (ByVal hwnd As Long) As Long


I haven't tried it but it should close a window like it says...