View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Reading Chunks of Excel Data

Why don't you want to use COPY. You DON'T need to select or activate cells
to use copy. You must be using the Macro Recorder code as your examples. I
always modify the Recorded macros to remove the activate and selection. for
example

Workbooks("book1.xls").Sheets("Sheet1").Range("A1: D4").Copy _
Destination:=Workbooks("book2.xls").Sheets("Sheet1 ").Range("A1")


or

With Workbooks("book1.xls").Sheets("Sheet1")
.Range("A1:D4").Copy _
Destination:=Workbooks("book2.xls").Sheets("Sheet1 ").Range("A1")
end With

or

Set DestSht = Workbooks("book2.xls").Sheets("Sheet1")
With Workbooks("book1.xls").Sheets("Sheet1")
.Range("A1:D4").Copy Destination:=DestSht.Range("A1")
end With


"Varne" wrote:

Hi

Is there a VBA technique €“ direct or indirect €“ to read chunks of cells
rather than copying. The following reads b4 to both a1 and a4.

Range("a1,a4").Value = Range("b4,b1").Value

If there is none is there a technique to do copying without selecting or
activating copied or receiving area.

Can someone help?

Thanks.