Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whenever I try to define a range with the following
syntax, for example: Worksheets("Name").Range(Cells(3,3), Cells(2402,3)) I get the following error message: Run-time error '1004': Application-defined or object- defined error. However, defining the range with the following syntax works just fine: Worksheets("Name").Range("C3:C2402") The problem is, I want to be able to treat the row and column numbers as variables within the code. The other interesting thing is that the offending method seems to work once, but then not again, or perhaps only works if the worksheet happens to be active, which doesn't help if I'm trying to write to ranges on more than one worksheet successively. Can anyone tell me what I'm doing wrong? Thanks in advance, Dave Dixon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range.Copy and error 1004 | Excel Programming | |||
Run-time 1004 error on range select | Excel Programming | |||
Range.cells.calculate give error 1004 only in XP | Excel Programming | |||
error 1004 Select method of Range class failed | Excel Programming | |||
error 1004 - metod Copy of class Range was failed | Excel Programming |