ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Question about Protecting a Workbook (https://www.excelbanter.com/excel-programming/284697-question-about-protecting-workbook.html)

TBA[_2_]

Question about Protecting a Workbook
 
Excel 2000
Windows 2k Pro

Is there a level of protection that I can set whereby a user can edit/change
a workbook all they want EXCEPT that they can't save it?

TIA.

-gk-



J.E. McGimpsey

Question about Protecting a Workbook
 
No. You can throw up some roadblocks using VBA, but they're easily
defeated by anyone with enough savvy to read these newsgroups.

Saving the file as Read-Only (Save As/Options) at least forces them
to use a different name (but doesn't prevent them from doing a
SaveAs, then changing the name back.


In article ,
"TBA" wrote:

Excel 2000
Windows 2k Pro

Is there a level of protection that I can set whereby a user can edit/change
a workbook all they want EXCEPT that they can't save it?

TIA.

-gk-


Paul B[_6_]

Question about Protecting a Workbook
 
you could use something like this to ask for a password before the workbook
is saved, but this can be defeated easily if someone knows much about excel

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
'must lock VBA project so you can't see the password in it
'Input box to verify password before saving
'put in this workbook module
Dim myPassword As String
myPassword = InputBox(prompt:="Please enter the password to proceed:", _
Title:="Password is required to save this file.")
'change password to what you want
If myPassword < "123" Then
MsgBox prompt:="Click OK to return to the workbook.", _
Title:="Correct password not entered", _
Buttons:=16
Cancel = True
Else
End If
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
"TBA" wrote in message
...
Excel 2000
Windows 2k Pro

Is there a level of protection that I can set whereby a user can

edit/change
a workbook all they want EXCEPT that they can't save it?

TIA.

-gk-






All times are GMT +1. The time now is 09:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com