Copy in VBA problem

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
 
A

Arvin Meyer [MVP]

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

Ian

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
 
Top