Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Deactivate Save As
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Deactivate Save As
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Deactivate Save As
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Deactivate Save As
Jim
You are a gentleman of the highest order. It works. Thanks very much. Alex.W "JMay" wrote: 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 |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Deactivate Save As
Glad it works for you. Thanks for the feedback (and complement :-)).
JMay "Alex.W" wrote: Jim You are a gentleman of the highest order. It works. Thanks very much. Alex.W "JMay" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel read only deactivate | Excel Discussion (Misc queries) | |||
Deactivate worksheet | Excel Discussion (Misc queries) | |||
Deactivate formula after a set time | Excel Discussion (Misc queries) | |||
Deactivate web toolbar | Excel Discussion (Misc queries) | |||
Deactivate tabs to click | Excel Worksheet Functions |