Adding password request


Posted by Dawny on June 24, 2001 9:44 AM

Hi!

I have a little project, which allows users to place, and print orders.
Within the workbook there are a number of worksheets the user is not permitted to access. I have hidden the toolbars, sheet tabs, scroll bars etc, to prevent accidental use.
Occasionally the project will need to be updated to reflect the increase in prices and changes in specifications or part numbers.

Could anyone suggest a way of using a control button to ensure that the person modifying the project is authorised to do so, i.e. call for a password, check that this is valid, if it is, then run a macro, if it is not; tell the user that they are not authorised to change the project.

Thanks for any suggestions,

Dawny

Posted by Joseph S. Was on June 24, 2001 10:31 AM

Password lock selected cells.



Posted by Joseph S. Was on June 24, 2001 10:37 AM

Password lock selected cells.

Note: This will only lock the whole sheet or lock, all the lock selected cells on a sheet.
Private Sub Worksheet_Change(ByVal Target As Range)
'
' Macro by Joseph S. Was
'
Application.EnableEvents = False

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="admin"
Application.EnableEvents = True

Hi!