![]() |
Protection
I have a budget sheet which allows restricted access (users without
password can only update certain cells). I want to be able to lock the sheet/unlock the sheet using buttons. I have tried a Macro but after the first time it only protects the sheet without a password. Can any one tell me how to correct this without having to go to Tools, Protection, etc etc every time as users might forget to do this. Thanks |
Protection
Private Sub SHEETPROTECT()
With ActiveSheet .Protect Password:="justme", DrawingObjects:=True, _ Contents:=True, Scenarios:=True .EnableSelection = xlUnlockedCells End With End Sub Private Sub SHEETUNPROTECT() ActiveSheet.Unprotect Password:="justme" End Sub You will have to lock the project for viewing so's curious users cannot see the code and password. Gord Dibben MS Excel MVP On Mon, 10 Mar 2008 08:34:35 -0700 (PDT), Paul wrote: I have a budget sheet which allows restricted access (users without password can only update certain cells). I want to be able to lock the sheet/unlock the sheet using buttons. I have tried a Macro but after the first time it only protects the sheet without a password. Can any one tell me how to correct this without having to go to Tools, Protection, etc etc every time as users might forget to do this. Thanks |
All times are GMT +1. The time now is 05:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com