Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a Workbook: Forcing User to Rename before Saving

I have a workbook that several people at work will be using. I want t
keep the orignal workbook intact and force the users to rename th
workbook whenever they try to re-save it.

Is it possible to add some code to the Workbook_BeforeSave event an
determine whether the file is being saved with the original filename?


Rolli

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Saving a Workbook: Forcing User to Rename before Saving

This should do the trick.

Sub Save()
Dim FName As Variant
ActiveSheet.Shapes("Rectangle 37").Select
Selection.CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:= _
False, AlwaysSuggest:=True, SpellLang:=1033
Range("A10").Select
FName = Application.GetSaveAsFilename( _
filefilter:="Excel files (*.xls),*.xls")
If FName = False Then
' user clicked cancel
Else
ThisWorkbook.SaveAs Filename:=FName
End If
End Sub

Pete


-----Original Message-----
I have a workbook that several people at work will be

using. I want to
keep the orignal workbook intact and force the users to

rename the
workbook whenever they try to re-save it.

Is it possible to add some code to the

Workbook_BeforeSave event and
determine whether the file is being saved with the

original filename?


Rollin


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Saving a Workbook: Forcing User to Rename before Saving

How about password protecting the document so the user has to rename
the file to save it?

Rollin_Again wrote in message ...
I have a workbook that several people at work will be using. I want to
keep the orignal workbook intact and force the users to rename the
workbook whenever they try to re-save it.

Is it possible to add some code to the Workbook_BeforeSave event and
determine whether the file is being saved with the original filename?


Rollin


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a Workbook: Forcing User to Rename before Saving

Protecting the entire workbook seems to have no effect on whether or no
changes can be made and the workbook re-saved. I tried passwor
protecting the book and when I made changes to the cells I was able t
re-save the workbook under the original name.

When I password protect the sheet, the cells cannot be modified at all
This will not work since the users need to modify the cells an
re-save with a different name.


Rolli

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a Workbook: Forcing User to Rename before Saving

Set the file to a read only file, when you set it to read only you ca
have the option of protecting the workbook from other users removin
the read only with a password. This still allows you to edit th
workbook but forces you to save it as a different file upon exit o
manualy clicking save

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a Workbook: Forcing User to Rename before Saving


Code
-------------------
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = False Then
MsgBox "Please choose Save As to save this workbook.", vbInformation
Cancel = True
End If
End Su
-------------------

You may be able to automate the SaveAs function as well.



--
Message posted from http://www.ExcelForum.com

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
Stop user from saving workbook unless cell is filled in Churley Excel Discussion (Misc queries) 3 October 16th 08 04:44 PM
How to rename workbook that I am editing without saving? [email protected] Excel Discussion (Misc queries) 1 March 23rd 08 04:00 PM
saving the last user who edited the file kman Excel Discussion (Misc queries) 1 February 23rd 06 08:20 AM
Prevent user from saving workbook keithl816 Excel Discussion (Misc queries) 3 January 15th 06 10:24 PM
Saving : Changed by another user Jeff Excel Discussion (Misc queries) 0 May 3rd 05 04:24 PM


All times are GMT +1. The time now is 09:25 AM.

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

About Us

"It's about Microsoft Excel"