Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop user from saving workbook unless cell is filled in | Excel Discussion (Misc queries) | |||
How to rename workbook that I am editing without saving? | Excel Discussion (Misc queries) | |||
saving the last user who edited the file | Excel Discussion (Misc queries) | |||
Prevent user from saving workbook | Excel Discussion (Misc queries) | |||
Saving : Changed by another user | Excel Discussion (Misc queries) |