title: Excel Application open new workbook after running script ended
body: <p>I have private sub for ThisWorkbooks to run a code to send email upon opening the file. After settle everything I will close working workbooks. I am sharing this code with other colleague. Usually, for me my Excel application only left with grey screen (like picture attach) but now its open new workbook Book1.xlsx if my colleague run this code from his computer.. And if didn't close Book1.xlsx  the script cannot be run again. Why this happening? I don't want to use <code>Application.Quit</code> because still got another working excel that I don't wish to close at that time.</p>
  <p>below is my code:</p>
  <p>Grey Excel Application</p>
  <p><a href="https://i.stack.imgur.com/JUQ6E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JUQ6E.png" alt="enter image description here" /></a></p>
  <pre><code>    Private Sub Workbook_Open()
  
      Call Send_Email
  
      Workbooks(&quot;Automail_V4.xlsm&quot;).Close
  
      End Sub
  
     
  
  
  
      Sub Send_Email()
      Dim ws As Worksheet
      Dim wb As Workbook: Set wb = ThisWorkbook
      Set ws = wb.Sheets(&quot;DL&quot;)
  
      With Application
          .EnableEvents = False
          .ScreenUpdating = False
      End With
  
      Dim fname As String
      fname = &quot;filepath(MasterFile)&quot;
      Workbooks.Open Filename:=fname, ReadOnly:=True
  
      Dim outlookApp As Outlook.Application
      Set outlookApp = CreateObject(&quot;Outlook.Application&quot;)
      Dim outMail As Outlook.MailItem
      Set outMail = outlookApp.CreateItem(olMailItem)
  
      outMail.Display
  
      With outMail
                  .Subject = &quot;Email[Daily]&quot;
                  .To = &quot;receipent&quot;
                  .HTMLBody = &quot;Hi &amp; paste info get from MasterFile.xlsx&quot;
           End With
           
      outMail.Send
  
      Application.Wait (Now + TimeValue(&quot;00:00:15&quot;))
  
      Set outMail = Nothing
      Set outApp = Nothing
  
      Application.CutCopyMode = False
      Workbooks(&quot;MasterFile.xlsx&quot;).Close savechanges:=False
  
      With Application
         .EnableEvents = True
        .ScreenUpdating = True
      End With
      End Sub
  </code></pre>