ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Destination parameter issue (https://www.excelbanter.com/excel-programming/415659-copy-destination-parameter-issue.html)

Simon[_2_]

Copy Destination parameter issue
 
MyWBRBS.Range("I65536").End(xlUp).Copy
Destination:=MyWBAccRep.Sheets("Volumes").Cells.Fi nd("latest").ActiveCell..Offset(7,
0)

What is wrong with the above? It says Obeject doesn't support this
property or method.

I tried it without .ActiveCell but that doesn’t seem to be the issue.
I’ve have thought that after Destination:= You would need to specify
the workbook and sheet name to state where the data will be copied
to. I thought stating it where it is would be acceptable for the Find
method.



I have already defined (Dim) and Set and Opened the workbooks MyWBRBS
and MyWBAccRep. MyWBRBS only has one sheet, hence no requirement to
declare which sheet you are selecting from.


Gary''s Student

Copy Destination parameter issue
 
Is ActiveCell a valid reference for a workbook that is not the Active
workbook??

Try:

1. Activate the source workbook
2. get the source Range
3. get the address of the source range (addS)
4. Activate the destination workbook
5. get the destination range
6. get the address of the destination range (addD)

Book1.Range(addS).Copy Destination:=Book2.Range(addD)
--
Gary''s Student - gsnu2008k

Bob Phillips[_3_]

Copy Destination parameter issue
 
It worked for me without Activecell

MyWBRBS.Range("I65536").End(xlUp).Copy _
Destination:=MyWBAccRep.Sheets("Volumes").Cells.Fi nd("latest").Offset(7, 0)


--
__________________________________
HTH

Bob

"Simon" wrote in message
...
MyWBRBS.Range("I65536").End(xlUp).Copy
Destination:=MyWBAccRep.Sheets("Volumes").Cells.Fi nd("latest").ActiveCell.Offset(7,
0)

What is wrong with the above? It says Obeject doesn't support this
property or method.

I tried it without .ActiveCell but that doesn’t seem to be the issue.
I’ve have thought that after Destination:= You would need to specify
the workbook and sheet name to state where the data will be copied
to. I thought stating it where it is would be acceptable for the Find
method.



I have already defined (Dim) and Set and Opened the workbooks MyWBRBS
and MyWBAccRep. MyWBRBS only has one sheet, hence no requirement to
declare which sheet you are selecting from.




All times are GMT +1. The time now is 11:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com