Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to copy a worksheet from File A to the cell "R1" of a worksheet in
File B by using VBA. Could someone please show me the way. Thank you. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can't copy a worksheet to a cell. You copy cells to cells, worksheets to
worksheets. If you want to copy all the cells in a worksheet to another worksheet beginning in R1, it's possible, but you no longer have all the columns available. Maybe something like this: Workbooks("Book6").Sheets(1).Cells.Resize(Cells.Ro ws.Count, Cells.Columns.Count - 18).Copy Workbooks("Book5").Sheets(1).Range("R1").PasteSpec ial Bob Umlas Excel MVP "AlanW" wrote in message ... I want to copy a worksheet from File A to the cell "R1" of a worksheet in File B by using VBA. Could someone please show me the way. Thank you. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel will not allow you to copy a larger range to a smaller range. If you
want to copy part of File A to a specific area of File B then you must be sure that the receiving range is equal to or larger than the source range. The code would be Sheets("FileA").Range("A1:B5").Copy Sheets("FileB").Range("R1") Where you would use your actual file names and the actual range to copy. "AlanW" wrote: I want to copy a worksheet from File A to the cell "R1" of a worksheet in File B by using VBA. Could someone please show me the way. Thank you. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello JLGWhiz
What I would like to do is to copy the whole range to a new file starting from the Cell R1. Could you please show me the whole procedure. By the way, shall I activate / open the destination file before copying. Many Thanks "AlanW" wrote: I want to copy a worksheet from File A to the cell "R1" of a worksheet in File B by using VBA. Could someone please show me the way. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy a worksheet from one file to another | Excel Discussion (Misc queries) | |||
copy part of a worksheet into a worksheet in the same file/keepi. | Excel Worksheet Functions | |||
Copy Worksheet from another file | Excel Programming | |||
Copy File into Worksheet | Excel Programming | |||
copy a worksheet to another xls file | Excel Programming |