MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Protecting Cells In Shared Spreadsheets


Posted by Jim Reece on April 04, 2001 3:25 AM

I have an Excel workbook with tabs for each of my co-workers. This workbook is a shared file because people need to keep it open most of the day. I have noticed that the lock cells feature disables when a file is shared. I need to have some cells locked and password protected on each spreadsheet. Is there a way to do this in a shared document?


Posted by Dave Hawley on April 04, 2001 4:43 AM


Hi Jim

Excel workbooks that are shared are plagued with problems, but try placing this code in the Sheets module of each Worksheet. To get there, right click on the sheet name tab and select "View Code"


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Locked = True Then Range("A1").Select
End Sub

Change A1 to a cell that is not Locked and maybe color code the locked cells.


Dave

OzGrid Business Applications