troubleshooting Question

Read A Numeric Formula From Excel Into VB 2010

Avatar of Buck Beasom
Buck BeasomFlag for United States of America asked on
.NET Programming
2 Comments1 Solution239 ViewsLast Modified:
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.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros