title: How to disable popups when opening a file Excel
body: <p>In a VB.NET program, I try to open an Excel file but I receive the following error message:</p>
  
  <p><a href="https://i.stack.imgur.com/rcsl5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rcsl5.png" alt="enter image description here"></a></p>
  
  <p>I use the <code>Microsoft.Excel.Interop</code> library to read the Excel file.</p>
  
  <p>When I perform <code>Workbooks.Open()</code>, Excel displays this message:</p>
  
  <pre><code>This copy of Microsoft Office is not activated.
  </code></pre>
  
  <p>How can I bypass or disable this popup while still editing in Excel?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Public Shared Sub WriteDataExcel()        
      Dim oExcel As New Excel.Application
      Dim oBook As Excel.Workbook = Nothing
      Dim oSheet As Excel.Worksheet = Nothing
  
      Try
          oExcel.Application.Visible = False
          oExcel.Application.DisplayAlerts = False
  
          oBook = CType(oExcel.Workbooks.Open(pstrExcelPath), Excel.Workbook)
          oSheet = CType(oBook.Worksheets(1), Excel.Worksheet)
      Catch ex As Exception
          OutPutErrLog(ex)
      End Try
  End Function
  </code></pre>
  
  <p>Can someone help me?</p>