Buck Beasom
asked on
Read A Numeric Formula From Excel Into VB 2010
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:
For String:
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.
For String:
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER