Code to create tabs in single excel sheet

D

deepa prabhakar

My doubt is this.
I need to write a program to open an excel sheet and copy 3 excel sheet
into single .xls file which should contain 3 excel sheets.How do i
proceed?
 
B

Bob Phillips

Dim oWBThis As Workbook
Dim oWB As Worksheet

Set oWBThis = ActiveWorkbook
Set oWB = Workbooks.Open(Filename:="Single.xls")
oWBThis.Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Copy _
after:=oWB.Worksheets(oWB.Worksheets.Count)


--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"deepa prabhakar"
 
Top