Copy in VBA problem

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

I'm trying to automatically insert some data copied from an Access table
into an Excel spreadsheet into another Excel spreadsheet.

Both sheets are open and referred to as objExcel & objExcel1.

I get "Copy method of Range class failed" with the following line.

objExcel1.range("A1:H1").copy objExcel.range("A5")

Any ideas?

Ian
 
I'm not an Excel MVP, but offhand it appears as if your 2 ranges do not
match in size. You may want to ask this in an Excel newsgroup as well.
 
I'll try adjusting the destination size later on, but in Excel, unless there
are merged cells, you only need to state the top. left cell.

Thanks for the suggestion.

Ian
 
Hi Arvin

I'm afraid it din't work, but I've found another method that works.

Ian
 

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