J
June Macleod
In vba how do I set a variable equal to the contents of a cell?
I tried:
dim asstype%
dim therow%
therow = 2
asstype = Worksheets("Sheet1").Range(Cells(therow, 21), Cells(therow,
21)).Value
but I get an "application defined or object defined error".
The problem seems to be in the Worksheets("Sheet1") part as the rest of the
line happy returns a value.
I am trying to run a macro on a cell in sheet2 that finds some values on
sheet 1 before performing a calculation.
Help!
June
I tried:
dim asstype%
dim therow%
therow = 2
asstype = Worksheets("Sheet1").Range(Cells(therow, 21), Cells(therow,
21)).Value
but I get an "application defined or object defined error".
The problem seems to be in the Worksheets("Sheet1") part as the rest of the
line happy returns a value.
I am trying to run a macro on a cell in sheet2 that finds some values on
sheet 1 before performing a calculation.
Help!
June