#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.misc
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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default 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
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
excel read only deactivate pinot1 Excel Discussion (Misc queries) 2 December 13th 06 01:27 AM
Deactivate worksheet Cordobes Excel Discussion (Misc queries) 3 December 4th 05 10:16 AM
Deactivate formula after a set time y_not Excel Discussion (Misc queries) 1 September 17th 05 10:24 AM
Deactivate web toolbar Anita Excel Discussion (Misc queries) 1 January 19th 05 12:46 AM
Deactivate tabs to click DrillerThriller Excel Worksheet Functions 3 November 23rd 04 09:18 PM


All times are GMT +1. The time now is 05:05 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"