title: How does Excel.Application.Visible behave?
body: <p>I'm designing a console application in VB.Net that needs to look through some excel files.  I would prefer to keep Excel hidden, but the code I have is not working the way I expected it to.</p>
  
  <pre><code>Dim xlApp As Excel.Application = New Excel.Application
  Dim xlWkBk As Excel.Workbook = xlApp.Workbooks.Open(dwgLogs(i), [ReadOnly]:=True)
  Dim xlSheet As Excel.Worksheet = xlWkBk.Sheets("Detail")
  With xlApp
      .EnableEvents = False
      .Visible = False
      .Application.Visible = False
      .DisplayAlerts = False
  End With
  </code></pre>
  
  <p>I'm not sure why, but only for a split second, the excel application opens and displays itself and then hides.  If I could, I would like it to not display at all.  Am I asking for too much, or am I not writing the code correctly?  Any help or insight would be greatly appreciated.  By the way, my current Excel version is 2013.  I'm not sure if that would affect anything, but I figured I'd mention it.</p>