Try dropping the <> 0. And assuming you are referring to the Popup menu? thread:

Code:
Private Declare Function IsWindow Lib "user32" (ByVal hWnd As Long) As Long
If (IsWindow(m_lhWnd)) Then '...