View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
DannyS DannyS is offline
external usenet poster
 
Posts: 23
Default protected cells can be deleted?!

I have a protect macro that runs whenever the workbook is opened and this
works well whenever a user attempts to overwrite a locked cell. However, if
the user just selects a locked cell then hits the delete key the cell is
deleted!

My macro is as follows:

Sub Auto_Open()

Dim wks As Worksheet

For Each wks In Worksheets
With wks
.Protect Password:="Password", userinterfaceonly:=True
.EnableOutlining = True
End With
Next wks

ActiveWorkbook.Protect Password:="Password", Structu=True, Windows:=False

End Sub

Any ideas how I can stop locked cells being deleted?

Thanks so much in advance!