Copy range from one workbook to another

C

Chad

Hi All,

I am trying to copy a range from one workbook to another. Other posts say
you cannot copy from an inactive worksheet, but when I copy to the
clipboard, open or activate the other workbook, it fails.

Workbooks("349999M.xls").Worksheets("Sheet1").Range("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False
ActiveWorkbook.Worksheets(1).Activate
Cells(1, 1).Activate
ActiveSheet.Paste

Any help would be great,
Thanks
Chad
 
J

JLGWhiz

Workbooks("349999M.xls").Worksheets("Sheet1").Range("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False
Workbooks("Bellpit").Worksheets(1).Cells(1, 1).Paste
 
J

JLGWhiz

Better yet:
Workbooks.Open "\\Server1\BellPit.xls", False
Workbooks("349999M.xls").Worksheets("Sheet1").Range("A1:E14").Copy
Destination:=Workbooks("Bellpit").Worksheets(1).Cells(1, 1)
 
C

Chad Cameron

Sorry, for the delay,

Thanks
Chad
JLGWhiz said:
Better yet:
Workbooks.Open "\\Server1\BellPit.xls", False
Workbooks("349999M.xls").Worksheets("Sheet1").Range("A1:E14").Copy
Destination:=Workbooks("Bellpit").Worksheets(1).Cells(1, 1)
 
C

Chad Cameron

Actually it didn't work

Here is my code

Workbook 07125M.xls is already open and active when the following code is
executed. The error is "Subscript is out of range"

Workbooks.Open "\\Server1\Data\Engineering\Highwall
Monitors\SLOPE_MONITORING_1XX_BellPit.xls", False
Workbooks("07125M").Worksheets("Sheet1").Range("A1:E16").Copy
Destination:=Workbooks("SLOPE_MONITORING_1XX_BellPit").Worksheets(1).Cells(1,
1)
 

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