Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John
 
Posts: n/a
Default Find Protected Cells Q

Is it possible to list a list of protected Cells in a worksheet, without
having to Right Click on each cell?

Thanks


  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
you could do this with VBA cycle through all cells. How do you want to
output this information and is VBA feasible for you?

--
Regards
Frank Kabel
Frankfurt, Germany

"John" schrieb im Newsbeitrag
...
Is it possible to list a list of protected Cells in a worksheet,

without
having to Right Click on each cell?

Thanks



  #3   Report Post  
John
 
Posts: n/a
Default

I just want to display, listed, on a a blank sheet those say within a
certain range. Its in order to protect cells I want to protect and identify
ones that are not. The default is obviously Protect, but I've worked a good
bit on the sheet so want to be sure

Thanks


"Frank Kabel" wrote in message
...
Hi
you could do this with VBA cycle through all cells. How do you want to
output this information and is VBA feasible for you?

--
Regards
Frank Kabel
Frankfurt, Germany

"John" schrieb im Newsbeitrag
...
Is it possible to list a list of protected Cells in a worksheet,

without
having to Right Click on each cell?

Thanks





  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

I think you mean locked. Individual cells can be locked
and unlocked, but protection refers to worksheets,
workbooks, and VBA projects. This macro will list
all "unlocked" cells. Select the range of cells and run
this macro:

Sub ListLocked()

'//Constructive criticism from VBA
'//programmers appreciated

Dim cell As Range
Dim rng As Range
Dim i As Long
Dim wList As Worksheet

Set rng = Intersect(Selection, ActiveSheet.UsedRange)
Set wList = Sheets.Add
wList.Cells(1, 1).Value = "Unlocked Cells"

i = 2
For Each cell In rng
With cell
If .Locked = False Then
wList.Cells(i, 1).Value = .Address(False, False)
i = i + 1
End If
End With
Next

End Sub

---
HTH
Jason
Atlanta, GA

-----Original Message-----
Is it possible to list a list of protected Cells in a

worksheet, without
having to Right Click on each cell?

Thanks


.

  #5   Report Post  
Gord Dibben
 
Posts: n/a
Default

John

Would changing background color of locked cells be of any use?

Sub Locked_Cells()
Dim Cell As Range, tempR As Range, rangeToCheck As Range
'first select a range of columns or CRTL + A
'check each cell in the selection
For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
If Cell.Locked Then
If tempR Is Nothing Then
'initialize tempR with the first qualifying cell
Set tempR = Cell
Else
'add additional cells to tempR
Set tempR = Union(tempR, Cell)
End If
End If
Next Cell

'display message and stop if no cells found
If tempR Is Nothing Then
MsgBox "There are no Locked cells " & _
"in the selected range."
End
End If
'select qualifying cells
'tempR.Select
tempR.Interior.ColorIndex = 3
End Sub

Gord Dibben Excel MVP

On Tue, 7 Dec 2004 14:15:42 -0000, "John" wrote:

I just want to display, listed, on a a blank sheet those say within a
certain range. Its in order to protect cells I want to protect and identify
ones that are not. The default is obviously Protect, but I've worked a good
bit on the sheet so want to be sure

Thanks


"Frank Kabel" wrote in message
...
Hi
you could do this with VBA cycle through all cells. How do you want to
output this information and is VBA feasible for you?

--
Regards
Frank Kabel
Frankfurt, Germany

"John" schrieb im Newsbeitrag
...
Is it possible to list a list of protected Cells in a worksheet,

without
having to Right Click on each cell?

Thanks







  #6   Report Post  
John
 
Posts: n/a
Default

Thanks Jason - exactly what I want


"Jason Morin" wrote in message
...
I think you mean locked. Individual cells can be locked
and unlocked, but protection refers to worksheets,
workbooks, and VBA projects. This macro will list
all "unlocked" cells. Select the range of cells and run
this macro:

Sub ListLocked()

'//Constructive criticism from VBA
'//programmers appreciated

Dim cell As Range
Dim rng As Range
Dim i As Long
Dim wList As Worksheet

Set rng = Intersect(Selection, ActiveSheet.UsedRange)
Set wList = Sheets.Add
wList.Cells(1, 1).Value = "Unlocked Cells"

i = 2
For Each cell In rng
With cell
If .Locked = False Then
wList.Cells(i, 1).Value = .Address(False, False)
i = i + 1
End If
End With
Next

End Sub

---
HTH
Jason
Atlanta, GA

-----Original Message-----
Is it possible to list a list of protected Cells in a

worksheet, without
having to Right Click on each cell?

Thanks


.



  #7   Report Post  
John
 
Posts: n/a
Default

Thanks Gord, neat piece of code


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
John

Would changing background color of locked cells be of any use?

Sub Locked_Cells()
Dim Cell As Range, tempR As Range, rangeToCheck As Range
'first select a range of columns or CRTL + A
'check each cell in the selection
For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
If Cell.Locked Then
If tempR Is Nothing Then
'initialize tempR with the first qualifying cell
Set tempR = Cell
Else
'add additional cells to tempR
Set tempR = Union(tempR, Cell)
End If
End If
Next Cell

'display message and stop if no cells found
If tempR Is Nothing Then
MsgBox "There are no Locked cells " & _
"in the selected range."
End
End If
'select qualifying cells
'tempR.Select
tempR.Interior.ColorIndex = 3
End Sub

Gord Dibben Excel MVP

On Tue, 7 Dec 2004 14:15:42 -0000, "John"

wrote:

I just want to display, listed, on a a blank sheet those say within a
certain range. Its in order to protect cells I want to protect and

identify
ones that are not. The default is obviously Protect, but I've worked a

good
bit on the sheet so want to be sure

Thanks


"Frank Kabel" wrote in message
...
Hi
you could do this with VBA cycle through all cells. How do you want to
output this information and is VBA feasible for you?

--
Regards
Frank Kabel
Frankfurt, Germany

"John" schrieb im Newsbeitrag
...
Is it possible to list a list of protected Cells in a worksheet,
without
having to Right Click on each cell?

Thanks







  #8   Report Post  
Gord Dibben
 
Posts: n/a
Default

John

Not mine....forgot to attribute to Bob Flanagan

http://www.add-ins.com/pages.htm

Thanks Bob.

Gord


On Thu, 9 Dec 2004 21:47:10 -0000, "John" wrote:

Thanks Gord, neat piece of code


"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
John

Would changing background color of locked cells be of any use?

Sub Locked_Cells()
Dim Cell As Range, tempR As Range, rangeToCheck As Range
'first select a range of columns or CRTL + A
'check each cell in the selection
For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
If Cell.Locked Then
If tempR Is Nothing Then
'initialize tempR with the first qualifying cell
Set tempR = Cell
Else
'add additional cells to tempR
Set tempR = Union(tempR, Cell)
End If
End If
Next Cell

'display message and stop if no cells found
If tempR Is Nothing Then
MsgBox "There are no Locked cells " & _
"in the selected range."
End
End If
'select qualifying cells
'tempR.Select
tempR.Interior.ColorIndex = 3
End Sub

Gord Dibben Excel MVP

On Tue, 7 Dec 2004 14:15:42 -0000, "John"

wrote:

I just want to display, listed, on a a blank sheet those say within a
certain range. Its in order to protect cells I want to protect and

identify
ones that are not. The default is obviously Protect, but I've worked a

good
bit on the sheet so want to be sure

Thanks


"Frank Kabel" wrote in message
...
Hi
you could do this with VBA cycle through all cells. How do you want to
output this information and is VBA feasible for you?

--
Regards
Frank Kabel
Frankfurt, Germany

"John" schrieb im Newsbeitrag
...
Is it possible to list a list of protected Cells in a worksheet,
without
having to Right Click on each cell?

Thanks







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
Auto Skipping and protected cells Dave Peterson Excel Discussion (Misc queries) 6 January 27th 05 11:35 PM
Find all cells with a number and mulitply Jim Excel Discussion (Misc queries) 3 January 21st 05 02:28 PM
Heps to design Locked/Unlocked cells in protected worksheet Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:09 AM
Protected cells -automatically format to a different color Fred Evans Excel Discussion (Misc queries) 9 December 3rd 04 12:59 PM
How do you delete one cell from a range of protected cells Cgbilliar Excel Worksheet Functions 2 November 3rd 04 10:42 PM


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