Sorry, made an error. Mixed some things (rows and columns ; BockRow and
BlockSize) up.
Anyhow : Is it sure that BlockRow - 3 = -1 Excel can't go (from C2)
more than 1 row up
and : Is it sure that Seed - 1 = -2 Excel can't go (from C2)
more than 2 columns to the left.
--
Regards,
Auk Ales
* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
"A.W.J. Ales" wrote in message
...
That's not strange ExcelMonkey ( You named yourself :) ) .
You select cel C2 as the active cell with Range("C2").Select.
In the last statement you then tell Excel to select a cell three (
blockrow - 3 = 0 - 3 = -3) to the left of cell C2.
The maximum Excel can go to the left is however 2 ( -2) and thereby in
column A.
--
Regards,
Auk Ales
* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
"ExcelMonkey " wrote in
message
...
I have a macro which is failing on line three of this code:
Sheets("Sheet1").Select
Range("C2").Select
ActiveCell.Offset(BlockRow - 3, Seed - 1) = BlockSize
It Selects the Sheet and the cell but cannot execute the last line.
Blocksize is a variable which is defined as:
?Blocksize
0
The error message is:
Run time Error 1004
Application Defined or object defined error.
What am I doing wrong?
Thanks
---
Message posted from http://www.ExcelForum.com/