I have a workbook "template" which when team members  use it  and
then
when they go to save it defaults to “my documents” and I would like to
set
up a macro to save it to a particular drive / file location.  This is
needed to stop team members saving to the wrong location etc.

Below is one that works for a word template that I use,  but I don’t
think it will work with an Excel file.


Excel  2003


Any Ideas ?


John



>>>>>>>>>>>>>>>>>> Credit to Graham Mayor  >>>>>>>>>>>>>>>>>>


For these macros.

Sub FileSaveAs()
Dim sPath As String
sPath = "S:\Duty & Assessment\DAT ONLY" 'set the default save as path
for the document
On Error Resume Next
ChDir sPath 'Change to the directory you wish to save in
If Err.Number = 76 Then 'that folder doesn't exist


    MsgBox sPath & " is not available on this PC?" & vbCr & "Select
the correct folder to save the document"
End If
With Dialogs(wdDialogFileSaveAs)


    .Name = sPath & "\"
    .Show 'show the save dialog
End With
End Sub


Sub FileSave()
Dim sPath As String
sPath = "S:\Duty & Assessment\DAT ONLY" 'set the default save as path
for the document
On Error Resume Next
If Len(ActiveDocument.Path) > 0 Then 'the document has been
previously
saved
   ActiveDocument.Save 'so save the changes
Else 'The document has not been saved
   ChDir sPath 'Change to the directory you wish to save in
   If Err.Number = 76 Then 'that folder doesn't exist


       MsgBox sPath & " is not available on this PC?" & vbCr &
"Select
the correct folder to save the document"
   End If
   With Dialogs(wdDialogFileSaveAs)


       .Name = sPath & "\"
       .Show 'show the save dialog
   End With
End If
End Sub


-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to