View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Disable the Close button on a Userform

On Dec 14, 2:32 pm, Moh wrote:
where do i put this code?
--



"Carim" wrote:
Hi,


Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
If CloseMode = vbFormControlMenu Then
' make user do what you want"
Cancel = True
End If
End Sub


HTH- Hide quoted text -


- Show quoted text -


Hi
Double click your form and paste it in (the code module behind the
form)
regards
Paul