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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do you Open An XLT file with VBA

Status
Not open for further replies.

u104741

MIS
Aug 26, 2003
94
GB
I hope some one can help me...
I am trying to open an excel file from MS Access to be used in the creation of a report...

While i can open the file no problem and create the report i realy want to open it so that it creates an unsaved new workbook.. so that there is no danger the user can save over my template... i hope that makes sense..

Ie i want to save my spreadsheet as an xlt file and open it with VBA but maintain the usual XLT functionality of creating a new workbook. (Opening the XLT file from VBA opens the template rather than creates a new workbook from it)

Hope some one can help...
JJ
 
A starting point:
Set objWorkbook = objExcel.Workbooks.Add("\path\to\template.xlt")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top