Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have an Excel/Word VBA app that uses templates for both. Trying to make it compatible for Office 97 forward, I had a problem using the Application.TemplatesPath to find the templates as the older and newer versions use difference locations. I am thinking perhaps the simplest solution is to do as one respondent said, to just put my Word and Excel templates in my Program Files\Application folder. I have Word templates and also Excel workbook and worksheet templates. For the Word .dot and Excel Workbook templates I can then set the path in the code. The only problem I am having now is trying to use the add method of the Worksheet to add the worksheet template to a workbook. The MS website doesn't give very specific instructions for adding a sheet as a template. I have tried to add from my template after the last sheet such as: Worksheets.Add.Move (after:= Worksheets(Worksheets.Count),Type:="C:\Path\TEmpla teName.xlt") and also Worksheets.Add.Move Type:="C:\Path\TEmplateName.xlt" However, I get error Application-defined or object-defined error message. Any idea what the right syntax is to get this done. Thanks again, Van |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Template worksheet | Excel Discussion (Misc queries) | |||
Worksheet Template | Excel Discussion (Misc queries) | |||
Template question - can I replace the default "worksheet" template | Excel Discussion (Misc queries) | |||
Worksheet template | Excel Worksheet Functions | |||
Create a template for every worksheet | Excel Discussion (Misc queries) |