ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Code to create tabs in single excel sheet (https://www.excelbanter.com/excel-discussion-misc-queries/90692-code-create-tabs-single-excel-sheet.html)

deepa prabhakar

Code to create tabs in single excel sheet
 

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?


--
deepa prabhakar
------------------------------------------------------------------------
deepa prabhakar's Profile: http://www.excelforum.com/member.php...o&userid=34821
View this thread: http://www.excelforum.com/showthread...hreadid=545775


Bob Phillips

Code to create tabs in single excel sheet
 
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"
<deepa.prabhakar.28epd0_1148633108.7019@excelfor um-nospam.com wrote in
message news:deepa.prabhakar.28epd0_1148633108.7019@excelf orum-nospam.com...

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?


--
deepa prabhakar
------------------------------------------------------------------------
deepa prabhakar's Profile:

http://www.excelforum.com/member.php...o&userid=34821
View this thread: http://www.excelforum.com/showthread...hreadid=545775





All times are GMT +1. The time now is 08:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com