Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So how exactly then do I lock down and protect cells from being edited on
multiple spreadsheets? "Gord Dibben" wrote: The password is provided in the macros so won't get asked for it. Gord Dibben MS Excel MVP On Mon, 1 Jun 2009 13:31:01 -0700, uncbluegal wrote: I've entered the following code within my excel document: Sub UnlockAllSheets() Const thePassword = "filepassword" Dim anySheet As Worksheet For Each anySheet In ThisWorkbook.Worksheets anySheet.Unprotect Password:=thePassword Next End Sub Sub LockAllSheets() Const thePassword = "filepassword" Dim anySheet As Worksheet For Each anySheet In ThisWorkbook.Worksheets anySheet.Protect Password:=thePassword Next End Sub I have many locked and unlocked cells within this 13 worsheet workbook. I can easily run either the unlock or lock macro - but - I'm never asked for the password when I run either macro. Why is this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need assistance with code issue?? | Excel Programming | |||
Code issue | Excel Programming | |||
Reliability issue with some code | Excel Programming | |||
Autofit code Issue | Excel Programming | |||
VBA Code issue | Excel Programming |