I got a null exception error in my code and I cannot understand why.
I have an excel file named 'FilterXpath' added to my project in 'Resources'. I have the code the below:
Dim FilterXpath As Microsoft.Office.Interop.Excel.Application
Dim w As Microsoft.Office.Interop.Excel.worksheet
Dim sheet As Worksheet
w = FilterXpath.Workbooks.Open("C:\Users\sridevi\Documents\Visual Studio 2008\Projects\WindowsApplication2\WindowsApplication2\Resources\FilterXpath.xlsx")
''I got null exception here stating that FilterXpath is used before it has been assigned a value.