Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Force Path for File Saving

Hi,

is there a way in Excel to force the file name and path - thus preventing
the user from choosing his own under the file, save as drop down.

I want to do this to prevent users on a shared workbook saving versions of
the file...I want it to always save to the same file on the network thus
preventing multiple copies.

Thanks for your help....Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Force Path for File Saving

Chris

You could put some Workbook_BeforeSave() event code in the ThisWorkbook
module in your workbook. (To implement right click on the Excel icon at the
top left of the workbook and select view code... Paste here)

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If SaveAsUI Then Cancel = True
MsgBox "You cannot save this file to another location", _
vbOKOnly + vbInformation, "Error"
End Sub

If a user selects Save as... it will cancel the save and alert the user.
This way they can only save to the original workbook. (They can take a copy
of course)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Chris Gorham" wrote in message
...
Hi,

is there a way in Excel to force the file name and path - thus preventing
the user from choosing his own under the file, save as drop down.

I want to do this to prevent users on a shared workbook saving versions of
the file...I want it to always save to the same file on the network thus
preventing multiple copies.

Thanks for your help....Chris


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
Saving txt file from excel by specifying path - drop down directory explorer Riggi Excel Programming 3 December 28th 06 01:56 AM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
How do I force a user to fill in all cells in excel before saving tomtomtomtomtom Excel Discussion (Misc queries) 1 August 16th 05 06:35 PM
Saving a file to a different path SVTman74 Excel Programming 1 July 26th 05 08:52 PM
Force *relative* path in Insert Hyperlink dialog Mark Tangard[_3_] Excel Programming 3 January 17th 05 02:48 PM


All times are GMT +1. The time now is 03:03 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"