Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Disable save, but not save as

I am trying to disable saving in order to not overwrite a master file. But I still want others to be able to save as a different file. I tried this as a possibility:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If ThisWorkbook.Name = "master.xls" Then
MsgBox "Can not save with this name - do saveas with a new name"
Cancel = True
End If
End Sub

But it won't let me do the 'save as' action either. Any Suggestions?

Thanks,
Wes
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Disable save, but not save as

Non-VBA approach:

Either use Windows Explorer to mark the file ReadOnly
or even use a password to open for updating.

When you save your master,
file|SaveAs|Tools|General Options|
give it a nice password to modify.

This is where it's hidden in xl2002.
In earlier versions, I think it was just under: File|SaveAs|Options



Wstohler wrote:

I am trying to disable saving in order to not overwrite a master file. But I still want others to be able to save as a different file. I tried this as a possibility:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If ThisWorkbook.Name = "master.xls" Then
MsgBox "Can not save with this name - do saveas with a new name"
Cancel = True
End If
End Sub

But it won't let me do the 'save as' action either. Any Suggestions?

Thanks,
Wes


--

Dave Peterson

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
how can i disable save i need save as only David128 New Users to Excel 3 November 9th 09 11:46 AM
Disable Save/Save As - not working? Silena K-K Excel Discussion (Misc queries) 3 December 11th 07 03:09 PM
Disable Quick Save & Save As L Weber Excel Discussion (Misc queries) 6 October 18th 07 08:57 PM
Disable save Jeff Excel Discussion (Misc queries) 2 October 3rd 07 02:31 PM
Disable save nobbyknownowt[_2_] Setting up and Configuration of Excel 0 February 13th 07 03:53 PM


All times are GMT +1. The time now is 07:30 PM.

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"