title: VB.NET 'WorksheetFunction' is not declared. It may be inaccessible due to its protection level
body: <p>It is my first post here so Hi everyone.
  I have a problem with code in VB.NET</p>
  
  <p>I have this line:</p>
  
  <blockquote>
    <p>WorksheetFunction.CountA(ExWorkSheet.Range("A1:C65536"))</p>
  </blockquote>
  
  <p>And compiler told me that: 'WorksheetFunction' is not declared. It may be inaccessible due to its protection level</p>
  
  <p>I also tried that: </p>
  
  <blockquote>
    <p>Application.WorksheetFunction.CountA(ExWorkSheet.Range("A1:C65536"))</p>
  </blockquote>
  
  <p>Then the error is: 'WorksheetFunction' is not a member of 'System.Windows.Forms.Application'
  Thank for any help</p>