Open Excel Error

G

Guest

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???
 
H

Herfried K. Wagner [MVP]

brix_zx2 said:
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()
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top