Saving a document in a particular file
Copy/paste to Thisworkbook module.
Edit to suit your path.
Private Sub Workbook_BeforeSave(ByVal _
SaveAsUI As Boolean, Cancel As Boolean)
'Saves the current file to a certain folder
'Note that any previous version is overwritten
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="C:\Gordstuff\" & _
ActiveWorkbook.Name
Application.DisplayAlerts = True
End Sub
Gord Dibben MS Excel MVP
On Wed, 9 Dec 2009 05:06:01 -0800, Wombat
wrote:
Is it possible to restrict the locations in which an Excel document can be
saved?
I want to put a restriction on a particular file so that the people I send
it to have to save it in a specific location on their hard drives...
Thanks for any help.
|