Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default protection indicator

Hi
I write two question a bout this but no answer
pleas, if possible I want a function that if worksheet protected write a
text in a cell
like "protected" if not protected, write "unprotected".
kind regards
nader
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default protection indicator

You can use the following sample macro code

Sub SetProtection()

Range("A1").Formula = "1"
Range("B1").Formula = "3"
Range("C1").Formula = "4"
ActiveSheet.Protect

' Check the protection setting of the worksheet and act accordingly.
If ActiveSheet.Protection.AllowInsertingColumns = False Then
ActiveSheet.Protect AllowInsertingColumns:=True
MsgBox "Insert a column between 1 and 3"
Else
MsgBox "Insert a column between 1 and 3"
End If

End Sub


You can use the following protection properties:
AllowDeletingColumns
AllowDeletingRows
AllowFiltering
AllowFormattingCells
AllowFormattingColumns
AllowFormattingRows
AllowInsertingColumns
AllowInsertingHyperlinks
AllowInsertingRows
AllowSorting
AllowUsingPivotTables


--
Kind Regards,
Satti Charvak
Only an Excel Enthusiast


"nader" wrote:

Hi
I write two question a bout this but no answer
pleas, if possible I want a function that if worksheet protected write a
text in a cell
like "protected" if not protected, write "unprotected".
kind regards
nader

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
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
Searching Indicator BillCPA Excel Discussion (Misc queries) 2 July 1st 08 04:50 PM
graphical indicator HL Excel Discussion (Misc queries) 1 March 28th 07 06:22 PM
Cell indicator D''Wanna Excel Discussion (Misc queries) 1 September 11th 06 10:35 PM


All times are GMT +1. The time now is 06:38 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"