Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Insert Custom Sheet.xlt


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


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=492495

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Insert Custom Sheet.xlt


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 :


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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Insert Custom Sheet.xlt


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
Dave
keepITcool Wrote:
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 :


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 i

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

use
"Insert,WorkSheet" ?

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


--
Desert Piranh

-----------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2893
View this thread: http://www.excelforum.com/showthread.php?threadid=49249

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Toolbar to Insert Picture Landon[_2_] Excel Discussion (Misc queries) 0 February 21st 08 06:18 PM
How do i insert symbol in custom footer Den Excel Discussion (Misc queries) 6 September 11th 07 12:19 AM
Insert work sheet with Custom headers DHM Excel Discussion (Misc queries) 4 July 12th 07 03:24 AM
Can't insert custom worksheet template S Car Go Excel Discussion (Misc queries) 4 May 6th 06 09:31 PM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"