P
PO
Excel 2003, sp2
Hi
I use unprotected cells in a worksheet for data entry. In some cases the
cells are merged, and all cells have borders and cell colors. After
protecting the worksheet (see code below) the user cannot change the
unlocked cells formats. The menu command Edit->Delete->All is however still
available to be used on the unlocked cells which results in all their
formats being lost (including the merge).
I there any way to prevent this from happening?
Sub Lock_Sheet(ByRef wksSheetToLock As Excel.Worksheet)
Select Case wksSheetToLock.CodeName
Case "wksDataEntry"
wksSheetToLock.Protect _
Password:=gsSHEET_PWD, _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True
End Select
End Sub
Regards
Pete
Hi
I use unprotected cells in a worksheet for data entry. In some cases the
cells are merged, and all cells have borders and cell colors. After
protecting the worksheet (see code below) the user cannot change the
unlocked cells formats. The menu command Edit->Delete->All is however still
available to be used on the unlocked cells which results in all their
formats being lost (including the merge).
I there any way to prevent this from happening?
Sub Lock_Sheet(ByRef wksSheetToLock As Excel.Worksheet)
Select Case wksSheetToLock.CodeName
Case "wksDataEntry"
wksSheetToLock.Protect _
Password:=gsSHEET_PWD, _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True
End Select
End Sub
Regards
Pete