1
Reply

please answer me

maayah2000

maayah2000

Dec 13 2004 6:39 AM
2.1k
HI i wrote this code put at run time there is an error mssege it is aditional information:object reference not set to an instance of an object at line oSheet = oBook.Worksheets(1) i need from this programm to open excel sheet and get data from it Dim obj As Excel.Application obj = CreateObject("Excel.Application") Dim oBook As Excel.Workbook obj.Visible = True Dim oBooks As Object = obj.Workbooks.Open("c:/test2.xls") Dim oSheet As Object oSheet = oBook.Worksheets(1) obj.Quit() thanks

Answers (1)