View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Userforms: Disabling - Enabling the X

Do you mean that when you subsequently click X on form #1 it doesn't close
and re-loads form #6? If so, that is inevitable, the code still functions as
before.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Lauri" wrote in message
...
I have disabled the X in a userform by

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

Which cancels them trying to close the window and redirects then to a
different userform...

Once I have chosen this option in the application once, it does not appear
to run again... it appears that this resets the button to always be
cancelled... How do I enable it so that this macro always runs with the

red
X is pressed?

Thx