View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
beginner here beginner here is offline
external usenet poster
 
Posts: 25
Default Disabling the Red X in Excel

I'm trying to find the coding to disable the red 'X' in the right hand corner
of any Excel worksheet. I know what the code is for a form, but can't find
the code for the worksheet.

The code I'm using for my form is the following:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "Please use the button !!"
End If
End Sub


Any help would be appreciated.

Steve