Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom Toolbar to Insert Picture | Excel Discussion (Misc queries) | |||
How do i insert symbol in custom footer | Excel Discussion (Misc queries) | |||
Insert work sheet with Custom headers | Excel Discussion (Misc queries) | |||
Can't insert custom worksheet template | Excel Discussion (Misc queries) | |||
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 | Excel Programming |