title: Sheet select from a Userform button causes data entered to go on previous sheet
body: <p>I call a macro called SelectSheet1, from a button on a userform, to select Sheet1.</p>
  
  <p>When data is entered afterwards it is put on the previous sheet.</p>
  
  <p>This is happening on Excel 2013. I confirmed it is not a problem in Excel 2007.</p>
  
  <p>Also it is not a problem if the macro is run directly from the developer tab, keyboard shortcut, quick access toolbar or ribbon customization.</p>
  
  <p>The userform command button code: </p>
  
  <pre><code>Private Sub CommandButton1_Click()
      Call SelectSheet1
      Unload UserForm1
  End Sub
  </code></pre>
  
  <p>The SelectSheet1 macro selects the sheet:</p>
  
  <pre><code>Sub SelectSheet1()
      Sheets("Sheet1").Activate
  End Sub
  </code></pre>
  
  <p><a href="https://www.dropbox.com/s/yh864yfoeoaijn0/Test%20Dialog%20Button%20for%20Navigation.xlsm?dl=0" rel="nofollow noreferrer">Link to xlsm file in dropbox</a></p>
  
  <p><a href="https://www.youtube.com/watch?v=p34IbXS98Xs" rel="nofollow noreferrer">Link to youtube video if you want to see with your own eyes</a></p>
  
  <p>It is a strange error and wondering if it a problem with Excel 2013, something changed in the way they do things and possibly there is a workaround.</p>