Making cells so users can select them

  • Thread starter Thread starter KimberlyC
  • Start date Start date
K

KimberlyC

Hi
I need to make a group of cells protected in such a way that the users
cannot even select them.
I tried to lock them and then protected the worksheet, but the users can
still select the cells.
The reason I'm trying to do this is to keep users from copying the cells to
another location. These cells are borders and if they copy them by mitake
it places the borders in another part of the worksheet.
Is there a way to make those cells where a user cannot even select them?

Thanks so much!
 
Kimberly,

You can use the below macro to protect all the worksheets.
Replace wxyz with what ever password you want. Be sure to protect the VB
project (while in VBE go to Tools > VBA Project Properties. Save and close.
Now when the workbook opens - only unprotected cells can be selected.

BUT - nothing is totally secure. Any one with determination can find a way
to copy...

==========================================
Private Sub Workbook_Open()
Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
WS.Unprotect Password:="wxyz"
WS.EnableSelection = xlUnlockedCells
WS.Protect Password:="wxyz", UserInterfaceOnly:=True
Next
End Sub
 
Back
Top