title: VBA Cancel uploading after specific time
body: <p>i have an excel document with some figures. Then a macro generates from different parts of the excel new excel documents.</p>
  
  <p>While this process the documents are uploaded to Sharepoint Libaray and then they should be closed.</p>
  
  <p>Sometimes the upload dialog from excel is not disappearing until you press "cancel" with the mouse or enter. </p>
  
  <p>My thought is that I can close the dialog programmatically after e.g. 5 seconds.
  How can I wait for 5 seconds and then simulate the enter key?</p>