-
protect a sheet
hello
i want to enable a user change data on a sheet but not formulas.
[VBA]
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
With ActiveSheet
.Unprotect
If cell.HasFormula Then
cell.Locked = True
Else
cell.Locked = False
ActiveSheet.Protect
End If
End With
Next
[/VBA]
is it possible to do it?
thanks
moshe
-
[vba]
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
With ActiveSheet
.Unprotect
cell.Locked = cell.HasFormula
.Protect
End With
Next
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules