View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Shazi Shazi is offline
external usenet poster
 
Posts: 74
Default Prevent UserForm by Ctl + Break (Unload Form)


Dear Friends,

I have a userform, & I put the below procedure to prevent form by
pressing X on the top right side button.


Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
If CloseMode = 0 Then Cancel = True
End Sub


But when I use Control + PauseBrake button its closing. which I
dont want. may be any user knows this technique, then he can close
the form.

Pls if any one knows how to prevent to run the Ctrl+Brake button to
close the form like this.

Thanks and regards.

Shahzad