title: Tab-key doesn't work with sheet that contains a button
body: <p>I have a spreadsheet with a button.
  When the button is pressed, code in the worksheet is executed.
  The code is very simple</p>
  
  <pre><code>Private sub cmdWerf_Click()
      MsgBox "button pressed"
  End Sub
  </code></pre>
  
  <p>I have a macro in a module that tries to save a copy of the sheet in a fixed location.</p>
  
  <pre><code>Public Sub Isolate_Problem()
      ActiveSheet.Copy
      ActiveWorkbook.SaveAs _
          Filename:="d:\efkes\test.xlsm", _
          FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
          CreateBackup:=False
      ActiveWindow.Close
  End Sub
  </code></pre>
  
  <p>When running the macro, Excel opens a new workbook, copies the sheet into it, saves it and returns to the original sheet.</p>
  
  <p>But the tab-key doesn't work any longer.  </p>
  
  <p>I have to go to another sheet (Alt-F6) and return to the original sheet.  Then it seems the sheet gets the focus again and the tab-key works again.  (Clicking in the original sheet moves the activecell, but the tab-key doesn't work)</p>
  
  <p>The macro works fine if I remove the button on the sheet.</p>
  
  <p>What is going on here.  How can I get the tab-key working again after the macro is executed.</p>
  
  <p>I already posed this question before (<a href="https://stackoverflow.com/questions/50391225/tab-key-doesnt-work-after-running-macro">TAB-key doesn&#39;t work after running macro</a>), but the problem wasn't well isolated.  In this thread, I isolated the problem in a small macro. </p>
  
  <p>Kind regards,
  Joris Adriaenssens.</p>