Copy Destination parameter issue

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

MyWBRBS.Range("I65536").End(xlUp).Copy
Destination:=MyWBAccRep.Sheets("Volumes").Cells.Find("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.
 
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)
 
It worked for me without Activecell

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


--
__________________________________
HTH

Bob

MyWBRBS.Range("I65536").End(xlUp).Copy
Destination:=MyWBAccRep.Sheets("Volumes").Cells.Find("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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top