ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2003 Range problem with .Net Interop (https://www.excelbanter.com/excel-programming/323068-excel-2003-range-problem-net-interop.html)

Simon Neumann

Excel 2003 Range problem with .Net Interop
 
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





All times are GMT +1. The time now is 03:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com