View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Protect sheet in macro

When you re-protect the sheet in your macro, protect all cells and make locked
cells unselectable.

With ActiveSheet
.Unprotect
.Calculate
.Cells.Select
Selection.Locked = True
.EnableSelection = xlUnlockedCells
.Protect
End With




On Thu, 8 Mar 2007 03:02:08 -0800, traima
wrote:

Hi,

I have this problem; I have a worksheet that is protected, the user kan
change values in 4 spesific cells. My macro unprotects the sheet, calcualte
and protects the sheet again. Now I would like to protect the sheet so that
it will not be changed by a mistake, so that the user cannot save the changes
in the workbook.

How can I do this?

traima