Error Opening Excel File in VB.NET

G

Guest

Hi, I have an application that reads in a bunch of values from an excel
application. Now this works fine on my computer but when I deploy it to a few
other computers, some of them return an 'Object Reference not set to an
instance of an object' error when I open it.

Here is my code....

Dim ExcelApp As Excel.Application
Dim ExcelBook As Excel.Workbook

ExcelApp = New Excel.Application
ExcelBook = ExcelApp.Workbooks.Open(Filename) ' error is here

I've narrowed it down to this only happening on computers with an older
version of Excel than I have currently installed. Does anyone know why this
happens and a solution that doesn't involve me installing an older version of
Excel?

Thanks,

Luc
 

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