Excel 2003 Range problem with .Net Interop

S

Simon Neumann

Hi,

I've written a function to get values from an Excel sheet to VB.Net via .Net
Interop:
....
Dim sheet As Excel.Worksheet = xlWorkbook.Worksheets("Liste")
Dim folder As String = sheet.Range("M2").Value

This worked great in Excel XP, but in Excel 2003 I'll get an error: "object
reference not set to an instance of an object". Obviusly the problem is the
range object, because I can get values from the sheet object.

Has anybody an idea what to do?

Thanks a lot!

Simon
 

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