title: VBA - Cancelling Dialog Box Run-time error 1004
body: <p>I am attempting to have my end sub when I click cancel.  However, I am getting a Run-Time Error when I do so.</p>
  
  <p><a href="https://i.stack.imgur.com/v7XiF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v7XiF.png" alt="RTE 1004"></a></p>
  
  <p>I am just trying to close the dialog box which I did with an <code>Else: Exit Sub</code> statement.  However, it still shows the Run-Time Error, while it should just exit sub.</p>