View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
SIGE SIGE is offline
external usenet poster
 
Posts: 44
Default HasFormula protect cell

This goes fine ...for my purposes!

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.HasFormula = True Then
Target.Locked = True
Me.Protect Password:=""
Else
Me.Unprotect Password:=""
End If
End Sub

Cheers Sige

"NOSPAM" to be removed for direct mailing...

*** Sent via Developersdex http://www.developersdex.com ***