ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Apply same template to other sheet (https://www.excelbanter.com/excel-programming/337369-apply-same-template-other-sheet.html)

shampabera

Apply same template to other sheet
 

Hi
Following is a code piece:
Dim xlApp As New Excel.Application

Dim xlWB As Excel.Workbook
Set xlWB = xlApp.Workbooks.Add("C:\...\Applicatio
Data\Microsoft\Templates\UBSTplt1.xlt")

Dim xls As Excel.Worksheet
Set xls = xlWB.Worksheets.Add()
xls.Name = "New Sheet"

xlWB.SaveAs ("c:\Test.xls")

My XLT has some predefined header text and colored cells. I want t
apply the same template to the new sheet I am adding to the Workbook a
above.
Can somebody please suggest how?
Thank

--
shampaber
-----------------------------------------------------------------------
shampabera's Profile: http://www.excelforum.com/member.php...fo&userid=2633
View this thread: http://www.excelforum.com/showthread.php?threadid=39608



All times are GMT +1. The time now is 10:44 PM.

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