title: Disable VBA UserForm 'x', but still allow Unload Me
body: <p>I have a user form that, when closed, needs to run cleanup steps. I would like for the <code>X</code> button to be disabled and/or not visible, but I still need to be able to unload the form. I've used code like the below, but it also blocks <code>Unload Me</code>.</p>
  
  <pre><code>'Disables closing via x button
  Sub UserForm_QueryClose(Cancel As Integer, ClsoeMode As Integer)
      If CloseMode = vbFormControlMenu Then
          MsgBox ("BLOCKED")
          Cancel = True
      End If
  End Sub
  </code></pre>