M
mike
REPOSTED FOR CLARIFICATION ( MS Office Excel 2003 )
temp = Sheets("Sheet1").Cells(Y, X).Value2
temp = Cells(Y, X).Value2
temp = Sheets("Sheet1").Range(Cells(Y, X), Cells(Y, X)).Value2
All 3 statements produce a 1004 runtime error. Use "Sheets" or
"Worksheets" makes no difference either.
Except for temp all variables are non-zero integers, and temp is
not declared (for now) so that Excel VB can determine the type as
needed.
None of the "Cells" referred to are "CurCell": not Active nor Selected
( that I know of )
I simply want to "point" to them i.e. to read them.
I believe even the Offset Method (?) changes the selected cell.
I don't want to employ the standard Range("A1") object since the A1 is
a literal string,
and I need more programatic control hence the Cells method.
Thanks, Mike
PS I've seen online doc with the same statements indicated that they
should work.
temp = Sheets("Sheet1").Cells(Y, X).Value2
temp = Cells(Y, X).Value2
temp = Sheets("Sheet1").Range(Cells(Y, X), Cells(Y, X)).Value2
All 3 statements produce a 1004 runtime error. Use "Sheets" or
"Worksheets" makes no difference either.
Except for temp all variables are non-zero integers, and temp is
not declared (for now) so that Excel VB can determine the type as
needed.
None of the "Cells" referred to are "CurCell": not Active nor Selected
( that I know of )
I simply want to "point" to them i.e. to read them.
I believe even the Offset Method (?) changes the selected cell.
I don't want to employ the standard Range("A1") object since the A1 is
a literal string,
and I need more programatic control hence the Cells method.
Thanks, Mike
PS I've seen online doc with the same statements indicated that they
should work.