Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display worksheet protection status in a cell?
My users are working with a worksheet that has protection on most of the
time, but without a password, just to help prevent accidents. It would be nice if there was a big red cell somewhere that said "Protected" or "Not protected". Is there a function that can display protection status? If not, anyone have a good suggestion for achieving this effect? Thanks, Geoff. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display worksheet protection status in a cell?
Hi Geoff........
Some one (don't remember who) gave me this, some time back......it works fine.....maybe you can use it..... Public Sub ToggleProtectWithIndication() 'This will add "##" to the SheetName on the Tab when you unprotect the sheet, 'and remove it when you reprotect it. Const PWORD As String = "drowssap" Dim wkSht As Worksheet With ActiveSheet If .ProtectContents Then .Unprotect Password:=PWORD .Name = .Name & "##" Else .Protect Password:=PWORD If .Name Like "*[##]" Then _ .Name = Left(.Name, Len(.Name) - 2) End If End With End Sub Vaya con Dios, Chuck, CABGx3 "Geoff C" wrote: My users are working with a worksheet that has protection on most of the time, but without a password, just to help prevent accidents. It would be nice if there was a big red cell somewhere that said "Protected" or "Not protected". Is there a function that can display protection status? If not, anyone have a good suggestion for achieving this effect? Thanks, Geoff. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display worksheet protection status in a cell?
Close enough! Many thanks, Geoff.
"CLR" wrote: Hi Geoff........ Some one (don't remember who) gave me this, some time back......it works fine.....maybe you can use it..... Public Sub ToggleProtectWithIndication() 'This will add "##" to the SheetName on the Tab when you unprotect the sheet, 'and remove it when you reprotect it. Const PWORD As String = "drowssap" Dim wkSht As Worksheet With ActiveSheet If .ProtectContents Then .Unprotect Password:=PWORD .Name = .Name & "##" Else .Protect Password:=PWORD If .Name Like "*[##]" Then _ .Name = Left(.Name, Len(.Name) - 2) End If End With End Sub Vaya con Dios, Chuck, CABGx3 "Geoff C" wrote: My users are working with a worksheet that has protection on most of the time, but without a password, just to help prevent accidents. It would be nice if there was a big red cell somewhere that said "Protected" or "Not protected". Is there a function that can display protection status? If not, anyone have a good suggestion for achieving this effect? Thanks, Geoff. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to populate a cell with the name of the worksheet it is in | Excel Discussion (Misc queries) | |||
Comparing a list to a Calendar worksheet. | Excel Worksheet Functions | |||
how do I display the name of a worksheet automatically in a cell? | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
Refrencing another cell in a worksheet that "could" exist | Excel Worksheet Functions |