View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Copy and Paste from One Workbook to Another

Dim wkbk as Workbook, wkbk1 as Workbook
Dim rng as Range
set wkbk = Workbooks("SourceBook.xls")
set wkbk1 = Workbooks.Open "C:\DestBook.xls"
set rng = wkbk1.Worksheets(1).Cells(rows.count,1).End(xlup)( 2)
wkbk.Worksheets(1).Range("A1").CurrentRegion.Copy _
Destination:=rng

--
Regards,
Tom Ogilvy


"Bill Oertell" wrote in message
...
Sorry. I know but my OE has problems. It crashes before I can post a
complete message.

What I want to do is copy from ThisWorkbook a range that has entries and
paste it to the end of ThatWorkbook, which already has some entries in it.
I would already have ThisWorkbook open and would want the macro to open
ThatWorkbook, which I'm using for record keeping, and copy the range that
has entries in ThisWorkbook and paste it after the last entry in
ThatWorkbook.



"J.E. McGimpsey" wrote in message
...
You don't give enough information. What is insufficient about

ThisWorkbook.SaveCopyAs("ThatWorkbook")

that you'd need to copy and paste?

If the code needs to figure things out, you'll need to give us
enough clues to figure them out, too.


In article ,
"Bill Oertell" wrote:

How can I copy from one workbook, open another and paste to it. IOW,

say
I've got a workbook named ThisWorkbook and want to paste its content

to
ThatWorkbook. To complicate matters the code needs to figure out what

range
to copy and where to start the paste in ThatWorkbook.