M
Mansour
Dear Friends,
I'm developing a VB.NET 2005 project in windows VISTA.
I add reference to Excel 11 (2003) type library.
My reference seems to be made to Excel.exe and declaration appears as below:
Dim myExcel As Microsoft.Office.Interop.Excel.Application
but it returns exception when I try to cast excel into it as below:
myExcel = GetObject(, "Excel.Application") or myExcel = GetObject(,
"Excel.Application.11")
If I change my delaration to
Dim myExcel As Object
everything goes well for a while but I cannot access most of Excel object
library's properties (such as Activeworksheet.cells(2,2).value) which were
all visible to me in VB6.
Any help would be highly appreciated.
Kind Regards,
M. Ramezani
I'm developing a VB.NET 2005 project in windows VISTA.
I add reference to Excel 11 (2003) type library.
My reference seems to be made to Excel.exe and declaration appears as below:
Dim myExcel As Microsoft.Office.Interop.Excel.Application
but it returns exception when I try to cast excel into it as below:
myExcel = GetObject(, "Excel.Application") or myExcel = GetObject(,
"Excel.Application.11")
If I change my delaration to
Dim myExcel As Object
everything goes well for a while but I cannot access most of Excel object
library's properties (such as Activeworksheet.cells(2,2).value) which were
all visible to me in VB6.
Any help would be highly appreciated.
Kind Regards,
M. Ramezani