Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve,
Just an added note: If the workbook is opened without macros enabled, than the user can do whatever they want. There are stratagies to hide all worksheets (xlVeryHidden) with only an instruction page visible saying that sheets cannot be viewed unless macros are enabled. Have an on open event macro to unhide the sheets and a close event macro to rehide the sheets. Protect your code and go from there. But - a serious person can find a way to "hack" the password... -- sb "Paul B" wrote in message ... Steve, give this a try, 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 "Password Is Not Correct" Cancel = True Else End If End Sub -- Paul B Always backup your data before trying something new Using Excel 97 & 2000 Please post any response to the newsgroups so others can benefit from it ** remove news from my email address to reply by email ** "Steve Quiroz" wrote in message ... Need to know how allow users to enter a password before they can save changes to the workbook? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Password Protect Excel Options | Excel Discussion (Misc queries) | |||
How can protect an Excel spreadsheet with a password | Excel Discussion (Misc queries) | |||
Track Changes and Password Protect a Document | Excel Discussion (Misc queries) | |||
trying to save a document, I get inaccessible or password protect | Excel Discussion (Misc queries) | |||
Password protect an Excel Document from viewing | Excel Discussion (Misc queries) |