Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to save the active workbook as a template to the same location
as the active workbook you might try code like this: ActiveWorkbook.SaveAs Replace(ActiveWorkbook.FullName, ".xls", ""), xlTemplate -- Jim Rech Excel MVP "Paul B" wrote in message ... | We are in the process of upgrading computers at my work, windows xp and | excel 2003, I am trying to get a macro to save the workbook as a template, | with windows 98 it saved to the same place, but with windows xp it looks | like it is getting the computers name as part of the save, the code below | was recorded on two of the computers ,is there anyway to write a macro that | will work on all the computers? Most of the people here have a limited | experience with excel and this file needs to be saved as a template after | they have put in there setup data, so I was wanting to put a button on the | sheet to save it as a template, put a shortcut on the desktop and delete | this button, I have code for the shortcut and to delete the button, but I | don’t know how to make it so the save will work on all of the computers. | Thanks | | Paul B | | | Sub Macro1() | ChDir "C:\Documents and Settings\electric\Application | Data\Microsoft\Templates" | ActiveWorkbook.SaveAs Filename:= _ | "C:\Documents and Settings\electric\Application | Data\Microsoft\Templates\Time Sheet.xlt" _ | , FileFormat:=xlTemplate, Password:="", WriteResPassword:="", _ | ReadOnlyRecommended:=False, CreateBackup:=False | End Sub | | Sub Macro2() | ChDir _ | "C:\Documents and Settings\carpentry\Application | Data\Microsoft\Templates" | ActiveWorkbook.SaveAs Filename:= _ | "C:\Documents and Settings\carpentry\Application | Data\Microsoft\Templates\Time Sheet.xlt" _ | , FileFormat:=xlTemplate, Password:="", WriteResPassword:="", _ | ReadOnlyRecommended:=False, CreateBackup:=False | End Sub | | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
SAVE and SAVE AS options disappeared from the drop down FILE menu | Excel Discussion (Misc queries) | |||
Save As and save current numbers not the actual formulas and links | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
when i save xls file, debug script is running and canno't save fil | Excel Discussion (Misc queries) |