MEMBER NOT FOUND" error HRESULT : 0x80020003 (DISP_E_MEMBERNOTFOUN

MEMBER NOT FOUND" error HRESULT : 0x80020003 (DISP_E_MEMBERNOTFOUN

am 27.12.2007 07:52:00 von Pallvi

Hello friends,

I am facing this problem("MEMBER NOT FOUND" error HRESULT : 0x80020003
(DISP_E_MEMBERNOTFOUND) ) in Visual Basic 2005 (i.e. VB .NET) for the fourth
statement(ObjWb = AppXls.Workbooks.Add) in the following code. I searched ,
but couldn't get relevent solution.

Imports Excel

Dim AppXls As Excel.Application
Dim ObjWb As Excel.Workbook

AppXls = CreateObject("Excel.Application")
ObjWb = AppXls.Workbooks.Add
ObjWb.Worksheets().Items("Sheet1").range("A1").value = "1"

ObjWb.SaveAs("C\pp\test.xls")
ObjWb.Close()
AppXls.Quit()
Could anybody plz help me? Would be appriciable.
Thanks and regards.

RE: MEMBER NOT FOUND" error HRESULT : 0x80020003 (DISP_E_MEMBERNOTFOUN

am 27.12.2007 12:46:02 von FamilyTreeMike

"Pallvi" wrote:

> Hello friends,
>
> I am facing this problem("MEMBER NOT FOUND" error HRESULT : 0x80020003
> (DISP_E_MEMBERNOTFOUND) ) in Visual Basic 2005 (i.e. VB .NET) for the fourth
> statement(ObjWb = AppXls.Workbooks.Add) in the following code. I searched ,
> but couldn't get relevent solution.
>
> Imports Excel
>
> Dim AppXls As Excel.Application
> Dim ObjWb As Excel.Workbook
>
> AppXls = CreateObject("Excel.Application")
> ObjWb = AppXls.Workbooks.Add

All the examples I have found show:
ObjWb = AppXls.Workbooks.Add(true)

> ObjWb.Worksheets().Items("Sheet1").range("A1").value = "1"
>
> ObjWb.SaveAs("C\pp\test.xls")
> ObjWb.Close()
> AppXls.Quit()
> Could anybody plz help me? Would be appriciable.
> Thanks and regards.