I have a VB 2010 application that I am trying to use to read values in from an Excel workbook. Regardless of whether I try to read a string value or a numeric value, I have problems. The code looks like this:
strWriteBusinessUnit = .Cells(intR, 2).ToString
For Numeric Value
intTestRow = .Cells(intR, intC)
This code works perfectly well in Access. But in VB 2010 it is interpreting the ".Cells(intR, intC)" as a "Range." What I want is to get the contents of the referenced cell into a variable in VB 2010 so I can test or manipulate it.
Any help will be appreciated.