Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Geoff C
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Geoff C
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to populate a cell with the name of the worksheet it is in MDF Excel Discussion (Misc queries) 2 September 1st 05 04:41 PM
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
how do I display the name of a worksheet automatically in a cell? Archie N. Excel Discussion (Misc queries) 2 August 22nd 05 07:01 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Refrencing another cell in a worksheet that "could" exist KimberlyC Excel Worksheet Functions 1 February 7th 05 07:09 PM


All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"