View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Pete Wright Pete Wright is offline
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/

.