Skip to content

Instantly share code, notes, and snippets.

@Vitosh
Created February 13, 2017 13:25
Show Gist options
  • Save Vitosh/ea7db4fa046ecfb0e0d79dc9fcbf979e to your computer and use it in GitHub Desktop.
Save Vitosh/ea7db4fa046ecfb0e0d79dc9fcbf979e to your computer and use it in GitHub Desktop.
Private Sub btnExit_Click()
RaiseEvent OnExit
End Sub
Private Sub UserForm_QueryClose(CloseMode As Integer, Cancel As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
RaiseEvent OnExit
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment