Copy range between workbooks

B

Bob Phillips

Dave, You have to open it to copy to it.

dim oWb As Workbook

Set oWb = Workbooks.Open("C:\Documents and Settings\Dave Newman\My
Documents\Admin\Test mule.xls")
Range("A1").CurrentRegion.Copy. _
oWb.Sheets(1).Range ("A6")
(not tested)
 
D

Dave Newman

Seems simple, but I can't seem to make it work. I'm trying to copy
CurrentRegion from one active sheet to a closed workbook.

Should I do it this way, or should I open the workbook, , then copy the
range (and how do I do _that_)?

f = "C:\Documents and Settings\Dave Newman\My Documents\Admin\Test mule.xls"
Range("A1").CurrentRegion.Copy. _
Workbook(f).Sheets(1).Range ("A6")

Someone please help a newbie!

Dave
 
D

Don Guillett

VERY difficult to copy TO a closed wb. Try recording a macro of:
opening wb
do your thing
close workbook save changes=false
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top