Tony
These functions will disable the Application window BUT not the workbook window.
Option Explicit
Dim hWnd ' Handle of activewindow
Dim hMenu% ' SystemMenu of hWnd
Declare Function GetActiveWindow Lib "User32" () As Integer
Declare Function GetSystemMenu Lib "User32" (ByVal hWnd As Integer, _
ByVal bRevert As Integer) As Integer
Declare Function DeleteMenu Lib "User32" (ByVal hMenu As Integer, _
ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer
'The following procedure disables Application Win
Sub Disable_Control()
Dim x As Integer
For x = 1 To 9
'Delete the first menu command and loop until
'all commands are deleted
Call DeleteMenu(GetSystemMenu(GetActiveWindow, False), 0, 1024)
Next X
End Sub
'The following procedure restores the Control menu
Sub RestoreSystemMenu()
'get the window handle of the Excel application
hWnd = GetActiveWindow()
'restore system menu to original state
hMenu% = GetSystemMenu(hWnd, 1)
End Sub
Ivan