Private Const GWL_STYLE = -16
Private Const WS_CAPTION = &HC00000
Private Const WS_SYSMENU = &H80000
Private Const SC_CLOSE = &HF060
#If VBA7 Then
Private Declare PtrSafe Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare PtrSafe Function DeleteMenu _
Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare PtrSafe Function GetSystemMenu _
Lib "user32" (ByVal hWnd As Long, ByVal bRevert As Long) As Long
#Else
Private Declare Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function DeleteMenu _
Lib "user32" (ByVal hMenu As Long, _
ByVal nPosition As Long, ByVal wFlags As Long) As Long
Public Declare Function GetSystemMenu _
Lib "user32" (ByVal hWnd As Long, ByVal bRevert As Long) As Long
#End If