Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Help with save as coed

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Help with save as coed

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
|
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
SAVE and SAVE AS options disappeared from the drop down FILE menu [email protected] Excel Discussion (Misc queries) 2 July 12th 07 09:14 AM
Save As and save current numbers not the actual formulas and links Frank Menard Excel Discussion (Misc queries) 2 November 9th 06 09:18 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM


All times are GMT +1. The time now is 01:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"