title: Excel add-in - get workbook name of "thisworkbook"
body: <p>I can't get the name of the workbook when I use a add-in.</p>
  
  <p>I'm trying to develop a add-in that runs each time you open Excel and reads the filename of the open file.</p>
  
  <p>If the file name is <code>XCFIL.SKV</code> then do something...</p>
  
  <p>This code should do it, but it doesn't. What am I missing?<br>
  The code stops and if I debug and press F8 it works fine, but it won't run on it's own.</p>
  
  <pre><code>Private Sub Workbook_Open()
      If ThisWorkbook.Name = "XCFIL.SKV" Then
          MsgBox "y"
      End If
  
  End Sub
  </code></pre>