Thread: Macros
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
burg burg is offline
external usenet poster
 
Posts: 3
Default Macros

Perfect. Thanks

"Norman Jones" wrote:

Hi Burg,

Try something like:

Sub Demo02()
Dim srcRng As Range, destRng As Range
Dim WB1 As Workbook, WB2 As Workbook

Set WB1 = Workbooks("MySourceBook.xls")
Set WB2 = Workbooks("MyDestinationBook.xls")
Set srcRng = WB1.Sheets("Sheet1").Range("A1:D6")
Set destRng = WB2.Sheets("Sheet1"). _
Cells(Rows.Count, "A").End(xlUp)(2)

srcRng.Copy destRng
End Sub


---
Regards,
Norman



"burg" wrote in message
...
Thanks Norman,

Just wondering how you specify a file path. I want to paste the data into
another spreadsheet. It is in the same folder so does this make it easier?

Thanks