da_silvy asked about the caption of the open window because that is what is used to close another running application (regardless of how it got running). If you know the caption, then use this.
VB Code:
  1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  2. 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
  3.  
  4. Private Const WM_CLOSE = &H10
  5. Private Const WM_QUIT = &H12
  6.  
  7. Private Sub Command1_Click()
  8. Dim CloseIt As Long
  9. CloseIt = FindWindow(vbNullString, "Caption Of Window To Be Closed")
  10. PostMessage CloseIt, WM_CLOSE, CLng(0), CLng(0)
  11. End Sub