ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Finding locked cells (https://www.excelbanter.com/excel-programming/277755-finding-locked-cells.html)

georgina

Finding locked cells
 
I've got a large spreadsheet used by many people. I need to find all the
cells which are locked, and either return a list of these cells or
change the color of them (but this part I can do myself).

Is there a function which finds locked cells?
Thanks,
Georgina



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Tom Ogilvy

Finding locked cells
 
Nothing better than looping

for each cell in usedrange
if cell.locked then
if rng = nothing then
set rng = cell
else
set rng = union(rng, cell)
end if
end if
Next
if not rng is nothing then
' do whatever
End if

--
regards,
Tom Ogilvy


georgina wrote in message
...
I've got a large spreadsheet used by many people. I need to find all the
cells which are locked, and either return a list of these cells or
change the color of them (but this part I can do myself).

Is there a function which finds locked cells?
Thanks,
Georgina



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com