this code copies the ENTIRE contents of a sheet named "Sheet1" an
pastes it into cell "A1" on a sheet named "Sheet2" it would result i
Sheet2 becoming a clone of sheet 1.
if you want to copy a spceific AREA of an excel sheet, then you need t
specify it as a RANGE before you copy,
and then you would want to paste it to the First cell in a range on th
sheet you'd like to copy things to.
let's say you had info in cells A1 to D7 on a sheet called "Finance
and you wanted to copy it to a range that started at cell "Z20" on
sheet called "Monkey", for that, you'd alter Mr. Ogilvy's code a
follows:
'begin code
worksheets("finance").range("A1:D7").Copy
worksheets("monkey").Range("Z20").Pastespecial paste:=xlFormulas
'end code
you could add this to the end of the code you already have (righ
before the line that says "End Sub") if you like, or you could creat
another routine that just does that copy/paste operation
for that you'd just say :
'begin code
Sub CopyToZ20
worksheets("finance").range("A1:D7").Copy
worksheets("monkey").Range("Z20").Pastespecial paste:=xlFormulas
End Sub
'end code
Does that help you customize your code
--
Message posted from
http://www.ExcelForum.com