You can have computer help for free. Helpero is a website that helps every Internet user, from all over the world, solve any computer related problem.
Helpero.com
 

advanced search

 
Ask Helpero
Home Home Home News News News Games Games Games How To How To How To Check this out Check this out Check this out
Helpero

How to assign the cell value from an Excel sheet to a variable in Visual Basic?



To get numerical data from the worksheet into your VB code use functions Range or Cells. For example, to get the value of cell "B2" into variable a in your VB code use:

a = Range("B2").Value

Alternatively, you could use

a = Cells(2,2).Value

to load your data value.











Subscribe to our newsletter

Join our mailing list to receive free, up-to-date computer news.

Tags

,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,

Links

  • Our answers are free, but we need 120$ every month to pay the server bills.

    30$ Raised this month.
-->

Home Helpero|Helpero Terms & Conditions Helpero|Helpero Contact
Copyright 2006-2008 Helpero.com

Computer Help Company