Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range from one workbook to another
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").Rang e("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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range from one workbook to another
Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy
Workbooks.Open "\\Server1\BellPit.xls", False Workbooks("Bellpit").Worksheets(1).Cells(1, 1).Paste "Chad" wrote: 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").Rang e("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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range from one workbook to another
Better yet:
Workbooks.Open "\\Server1\BellPit.xls", False Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy Destination:=Workbooks("Bellpit").Worksheets(1).Ce lls(1, 1) "Chad" wrote: 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").Rang e("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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range from one workbook to another
Sorry, for the delay,
Thanks Chad "JLGWhiz" wrote in message ... Better yet: Workbooks.Open "\\Server1\BellPit.xls", False Workbooks("349999M.xls").Worksheets("Sheet1").Rang e("A1:E14").Copy Destination:=Workbooks("Bellpit").Worksheets(1).Ce lls(1, 1) "Chad" wrote: 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").Rang e("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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range from one workbook to another
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_BellP it").Worksheets(1).Cells(1, 1) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy range from one workbook to other in C# | Excel Worksheet Functions | |||
copy a range from another workbook | Excel Programming | |||
Need a macro to copy a range in one workbook and paste into another workbook | Excel Programming | |||
Copy a range of cells in an unopened workbook and paste it to the current workbook | Excel Programming |