Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a new workbook from a template..

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
GB
Hi,

I appreciate that this might be a simple fundamental question, but how can i create a new xls file from an xlt file (like using the File >> New inside the Excell itself)

I have this for starters..

Code:
Dim SchedulePath As String
SchedulePath = "X:/Templates/SheetSchedule.xlt"
Set SheetScheduleXL = XLApp.Workbooks.Open(SchedulePath)

...but i don't want to open the .xlt file, i want to open an .xls from it..

Sorry if this is Sesame Street VBA..



Cheers,

Paul
basepointdesignzltd..
XP Pro..
Pentium Core 2 Q6600 Quad Core
ASUS P5N-E SLI Motherboard
4GB DDR2 RAM
2 x SLI NVIDIA 8500GT SLi 1024MB DDR2 PCI-Express Graphics Cards
 




File > NEW

Turn on your macro recorder and have at it.

Skip,

[glasses]Just traded in my old subtlety...
for a brand NUANCE![tongue]
 
Almost there, use Add instead of Open...

Code:
    Dim SchedulePath As String
    SchedulePath = "X:/Templates/SheetSchedule.xlt"
    Set SheetScheduleXL = XLApp.Workbooks.Add(SchedulePath)

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top