View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
JMay JMay is offline
external usenet poster
 
Posts: 468
Default Deactivate Save As

From your spreadsheet do an ALT+F11 to get to the VBE program
Find your file (project) name in the Project explorere window (the tree type
window) and double-click on the THISWORKWOOK object
then in the Code window paste in:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Application.UserName < "Jim May" Then 'as registered under Tools,
Options, General Tab, name in the box at bottom of screen
Cancel = SaveAsUI
End If
End Sub

This will prevent any user (except Jim May) from accessing the File SaveAs
option.
So change the above "Jim May" to "Your Name" as it appears EXACTLY in the
box mentioned aboe under Tools, Options, General Tab, at bottom of that
screen.

Hope this helps...

Jim May

"Alex.W" wrote:

JMay, many thanks for the reply. I am a novice at some of this. Are you able
to expand on your suggestion? What is a workbook event? What would an
appropriate macro for this look like?

Alex.W

"JMay" wrote:

I'd begin with a Workbook event.. using the "BeforeSave" event -- an include
a line Cancel = True also then maybe incorporate an If statement something
like.. If username = Yourname then Exit Sub (and allow the file, saveas)

Hope this helps..


"Alex.W" wrote:

I am publishing a file to a local intranet. The intranet provides a read-only
function to the file. However, it does not prevent the file being saved under
the Save As function in Excel. How can I deactivate it for the intranet users
but remain active for myself?

Alex.W