View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
leerem leerem is offline
external usenet poster
 
Posts: 88
Default unprotect worksheet when......

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Enter this routine in the class module of the sheet you wish to unprotect

If Target.Cells.Count 1 Then
Exit Sub
End If
If Not Application.Intersect(Range("B34"), Target) Is Nothing Then
ActiveSheet.UnProtect
end if
end sub

"Wanna Learn" wrote:

Hello is it possible to unprotect a worksheet when a certain cell is
selected using VBA . I need to unprotect the worksheet when cell B34 is
selected and remain unprotected.
thanks in advance