Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
laurentdada
 
Posts: n/a
Default How do I show protected cells in an EXCEL worksheet

Once I have protected a sheet leaving unprotected cell to allow users chsnge
or input data, users of this sheet do not know which cells they can change
(unprotected) unless they try to click on every cell and are allowed to
change the data in it.
My question is: is there a way to display protected or unprotected sheet and
if there is how to do it; and whether we can control the movement of the
cursor in a protected sheet.
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

Try:

Sub ColorLocked()
Dim cell As Range
Dim ThisWs As Worksheet
Set ThisWs = ActiveSheet
ThisWs.Unprotect Password:="thisismypassword"
For Each cell In ThisWs.UsedRange
With cell
If .Locked Then
.Locked = False
.Interior.ColorIndex = 6
.Locked = True
End If
End With
Next
ThisWs.Protect Password:="thisismypassword"
End Sub

---
To use, press ALT+F11, then go to Insert Module, and paste in the code
above. From there press ALT+Q to close the VBE and run the macro from Tools
Macro Macros.

HTH
Jason
Atlanta, GA


"laurentdada" wrote:

Once I have protected a sheet leaving unprotected cell to allow users chsnge
or input data, users of this sheet do not know which cells they can change
(unprotected) unless they try to click on every cell and are allowed to
change the data in it.
My question is: is there a way to display protected or unprotected sheet and
if there is how to do it; and whether we can control the movement of the
cursor in a protected sheet.

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

This is a re-print of a previous post of mine that will highlight locked
cells

Sub LockedCells()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked Then
With cell
With .Interior
.ColorIndex = 35
.Pattern = xlSolid
End With
.BorderAround LineStyle:=xlDashDotDot, Weight:=xlThick,
ColorIndex:=5
End With
End If
Next cell
End Sub

Change
If cell.Locked Then
to
If Not cell.Locked Then



--

HTH

RP
(remove nothere from the email address if mailing direct)


"laurentdada" wrote in message
...
Once I have protected a sheet leaving unprotected cell to allow users

chsnge
or input data, users of this sheet do not know which cells they can change
(unprotected) unless they try to click on every cell and are allowed to
change the data in it.
My question is: is there a way to display protected or unprotected sheet

and
if there is how to do it; and whether we can control the movement of the
cursor in a protected sheet.



  #4   Report Post  
PegL
 
Posts: n/a
Default

Also, using the Tab key to navigate within the sheet will take the user to
only the unlocked cells.

"laurentdada" wrote:

Once I have protected a sheet leaving unprotected cell to allow users chsnge
or input data, users of this sheet do not know which cells they can change
(unprotected) unless they try to click on every cell and are allowed to
change the data in it.
My question is: is there a way to display protected or unprotected sheet and
if there is how to do it; and whether we can control the movement of the
cursor in a protected sheet.

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 do I get excel to add cells by color? Like all green cells (s. chakatania Excel Discussion (Misc queries) 1 March 8th 05 10:25 AM
UDF and Calculation tree Ken Wright Links and Linking in Excel 1 February 6th 05 04:58 PM
How do I password protect cells in a spreadsheet created in Excel Tbenson37303 Excel Worksheet Functions 0 November 22nd 04 09:21 PM
How do I password protect cells in a spreadsheet created in Excel [email protected] Excel Worksheet Functions 0 November 22nd 04 09:21 PM
stop excel from shifting cells up when a query returns no data DrLostinExcel Excel Worksheet Functions 2 November 9th 04 05:44 PM


All times are GMT +1. The time now is 10:34 PM.

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"