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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging Excel files

Status
Not open for further replies.

DKL01

Programmer
Sep 14, 2000
233
US
Hi,

Is there any way we can merge (programatically ) excel sheets from several excel files into a single excel file ?

Thanks
 
Hi,

Here it is...
Code:
    Dim objThis As Workbook
    Set objThis = ActiveWorkbook
    For Each Workbook In Workbooks
        If Workbook.Name <> objThis.Name Then
            Workbook.Worksheets.Copy _
                Before:=objThis.Sheets(1)
            
        End If
    Next
hope this helps.. :) Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top