myValueFromA1 = Worksheets("sheetName").Range("A1").Value
that is the most formal way of referring to the value in A1 on a sheet.
Since .Value is the default property you could shorten it to:
myValueFromA1 = Worksheets("sheetName").Range("A1")
and if the code is associated with the sheet itself, then
myValueFromA1 = Range("A1")
is acceptable.
If you are certain that the sheet with the A1 cell you are interested in is
the currently selected sheet (absolutely certain) then
myValueFromA1 = ActiveSheet.Range("A1")
would work.
"Ross" wrote:
How do I get into VB the value of a cell?
More specifically: suppose I need to write a web query, where I need to
specify an address where a piece of it is the entry of cell A1?
thanks!!
Ross