Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inporting a Separate excel sheet to an existing workbook 2

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US

URGENT
I need to know if it's possible to insert a one page report document to an existing 5 page workbook? and need to know how to do it. Thanks Tony
:cool:
 
Open both workbooks. Right click the tab of the sheet you wish to copy. Select Move/Copy from the list. Then, select the desitnation workbook and sheet placement, making sure that you check the Make Copy option.
 
If you wanted to know how to do it using code, maybe this will help you.
Code:
Sub AddCurrentSheet()
ActSh As Object
    
    Set ActSh = ActiveSheet

    With Workbooks("MyBook.xls")
        'Copy sheet into MyBook.XLS workbook
        ActSh.Copy After:=.Sheets(1)
    End With

End Sub
Note: This will only work if both items are open and you run the macro from the sheet you want to copy.
 
Oops, you might want to change that .Sheets(1) to .Sheets(5)

Or where ever you want the copied sheet to appear.
 
Both options did what I was looking for. Thanks fellas. Tony
:cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top