I want to make the excel program close botton disable not the
vb form close botton, you know.
The initial thought in my mind is to use API program:
Public Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Public Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
But how to write follow this?
is
Dim hMenu As Long
hMenu = GetSystemMenu(Application.hWndExcelApp, 0)
Call DeleteMenu(hMenu, SC_CLOSE, MF_BYCOMMAND)
right?