how to read a value from a cell in VBA?
The default Property of a cell is the Value Property, so
Will both read the value of range A1 of the active sheet. If the cell to be read is on another sheet, use
You could try,
msgbox "Activecell (" & activecell.address & ") = " & Activecell.value
msgbox "Cell A1 = " & Range("A1").value
The first uses the Currently selected cell and the second uses the cell A1 on the current worksheet.
Hope this helps.
Hi Andy n Dave,
Thanks for the reply...
My problem is to have a variable Range.
I will read the range from 2 cells, that explains my earlier posting.
Eg. if what i wanted was Range("A82:G88").
I have cell I82 containing the value of A82 and cell J82 containing the value G88
but I got syntax error.
what's wrong with my code?