Insert Custom Sheet.xlt

D

Desert Piranha

Hi all,

I have a custom "Book.xlt" which is opening as "Book1" when Excel
opens, no problems.

I have a "Sheet.xlt" in the same folder as the Book.xlt, that if when i
use "Insert, Worksheet" it
opens fine. No problems. (They are the same formating)

If i use:

Code:
--------------------
Sub AddWorkSheetAtEnd()
Worksheets.Add After:=Worksheets(Worksheets.Count)
End Sub
--------------------
then i get a OLD default worksheet.

How can i word the code to open the custom "Sheet.xlt", as when i use
"Insert,WorkSheet" ?

Xl 2000
Book.xlt and Sheet.xlt are in:
C:\Documents and Settings\Owner\Application
Data\Microsoft\Excel\XLSTART
 
K

keepITcool

simpler than you think :)
(but it fails if you use worksheets collection iso sheets

Sheets.Add After:=Sheets(Sheets.Count), _
Type:=Application.TemplatesPath & "\TestSheet.xlt"


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Desert Piranha wrote :
 
D

Desert Piranha

Hi keepITcool,

This will work.
I had to put a Sheet.xlt into the Template folder.
One thing is, when it inserts a new sheet,
it names them as Sheet1(2), Sheet1(3), Sheet1(4) etc
instead of Sheet2, Sheet3, Sheet4.

I can live with it though.

thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top