Home All Groups Group Topic Archive Search About
Author
1 Apr 2005 5:41 PM
brix_zx2
VB.NET 2k3 using these statements:

        Dim ThisApplication As Excel.Application
        ThisApplication.Workbooks.Open("C:\Program Files\97CS\SelfInspect
1.0\NewForm27.xls")

Statements look good then I debug and it gives me:

An unhandled exception of type 'System.NullReferenceException' occurred in
CSInspector.exe

Additional information: Object reference not set to an instance of an object.

On Break I have to view the disassembly (which is way over my head) an arrow
points to:

0000001d  mov         eax,dword ptr [ecx]


Anyone have ideas on what this means???

Author
1 Apr 2005 9:27 PM
Herfried K. Wagner [MVP]
"brix_zx2" <brix***@discussions.microsoft.com> schrieb:
> VB.NET 2k3 using these statements:
>
>        Dim ThisApplication As Excel.Application

You are never assigning an instance of 'Excel.Application' to the variable
'ThisApplication'.

\\\
Dim ThisApplication As New Excel.Application()
///

Show quoteHide quote
>        ThisApplication.Workbooks.Open("C:\Program Files\97CS\SelfInspect
> 1.0\NewForm27.xls")
>
> Statements look good then I debug and it gives me:
>
> An unhandled exception of type 'System.NullReferenceException' occurred in
> CSInspector.exe
>
> Additional information: Object reference not set to an instance of an
> object.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>