Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim lngHwnd As Long lngHwnd = FindWindow(vbNullString, "Windows Live Messenger")