View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lauri Lauri is offline
external usenet poster
 
Posts: 13
Default Userforms: Disabling - Enabling the X

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