Paste Worksheets in Another Workbook

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?
 
G

Guest

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.
 
G

Guest

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.
 

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