Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can somebody explain to a beginning programmer why this statement does not
work? wkb2.Worksheets(1).Range("a1", Range("i1").End(xlDown)).Copy _ Destination:=wkb1.Worksheets(1).Range("a2") keep getting this error message. Run-time error '1004': application-defined or object-defined error If I write it this way, it works. Set selRow = wkb2.Sheets(1).Range(ActiveCell, ActiveCell.End(xlDown)) wkb2.Worksheets(1).Range("a1", "i" & selRow.Rows.Count).Copy _ Destination:=wkb1.Worksheets(1).Range("a2") I am trying to see why the one statement does not work and the two statements works. I am assuming that it has to do with the row count or the last row on the "i" column is empty but the error statement doesn't suggest that. Does it have to do with references to objects? I don't mine having two statements but I want to understand why it doesn't work. Thanks in advance for your explaination. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
file size makes no sense! | Excel Programming | |||
Run-Time error 1004 issue just not making sense | Excel Programming | |||
how to sense -1 value at any cell in a column | Excel Programming | |||
Converting a date from nonsense to sense | Excel Discussion (Misc queries) | |||
Does this make sense? | Excel Programming |