View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default Locking worksheets

Hi,

Maybe something like this would help. It will act as a toggle between being
protected and not. Add a button to the sheet and asign it to the macro
below.

Sub Button1_Click()
With ActiveSheet
If .ProtectContents = True Then
.Unprotect "password"
.EnableSelection = xlNoRestrictions
Else
.Protect "password"
.EnableSelection = xlNoSelection
End If
End With
End Sub

--
Hope that helps.

Vergel Adriano


"slim4921" wrote:

I am using Excel 2003 and would like to lock a worksheet, other than a check
box or button, such that the remainder of the sheet cannot be interacted with
(but can be viewed) until the check box or button has been clicked.

Any help greatly appreciated. Thanks