i have a function in VB.net 2002 (see code below) and i get a "MEMBER NOT FOUND" error. cant figure out whats wrong..
Public Function GetSheetName_control(ByVal Filename As String) As String
Dim oxlApp As Excel.Application
Dim oxlBook As Excel.Workbook
Dim oxlSheet As Excel.Worksheet
oxlApp = CType(CreateObject("Excel.Application"), Excel.Application)
oxlBook = CType(oxlApp.Workbooks.Open(Filename), Excel.Workbook) /*ERROR IN THIS LINE*/
oxlSheet = CType(oxlBook.Worksheets(1), Excel.Worksheet)
oxlApp.Workbooks.Close()
oxlApp.Quit()
/*more codes below...*/
End Function