Paste Worksheets in Another Workbook

  • Thread starter Thread starter dswiders
  • Start date Start date
D

dswiders

I need to be able to have worksheets from multiple workbooks copied
and then pasted to the end of another workbook. I have the code set
so that the user can type in the file they would like to open for
everything to be pasted to but I dont know how to have worksheets from
separate workbooks pasted in. Any suggestions?
 
Record a new macro while going through the process of copying a sheet or two
from one workbook into another, then examine that code.

You'll need to set up variables to hold the names of the workbooks. You can
paste to the end of the other workbook by using the After:= parameter and the
Worksheets.Count property of that workbook. The macro is going to show you
something like After:=Sheets(3) where 3 is the number of the sheets in the
workbook before the copy was done. You could use After:=Sheets(Sheets.Count)
to make that a variable and always copy the new sheets to the end of that
workbook.
 
Works for me

JLatham said:
Record a new macro while going through the process of copying a sheet or two
from one workbook into another, then examine that code.

You'll need to set up variables to hold the names of the workbooks. You can
paste to the end of the other workbook by using the After:= parameter and the
Worksheets.Count property of that workbook. The macro is going to show you
something like After:=Sheets(3) where 3 is the number of the sheets in the
workbook before the copy was done. You could use After:=Sheets(Sheets.Count)
to make that a variable and always copy the new sheets to the end of that
workbook.
 
Back
Top