View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
A.W.J. Ales A.W.J. Ales is offline
external usenet poster
 
Posts: 63
Default Application Defined or object defined error

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/