Disabling Cell Editing
This is code from help. It looks to see if one range iscontained within
another range.Just remember that the code is designed to allow the user to
only select cells that are not Locked... So you start with all (or
most)cells unlocked and than start locking the ones you want
protected.replace Range("rg1") with Target Range("rg2") with
Range("B2:B45")Than use Target.Locked = trueYou will probably have to
unprotect before, and reprotect after.Worksheets("Sheet1").Activate
Set isect = Application.Intersect(Range("rg1"), Range("rg2"))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If
--
steveB
Remove "AYN" from email to respond
"programmingrookie" wrote in
message ...
If I had a column, say B5 to B45, that the names are to be entered into,
would this code allow me to disable a portion of the column while the rest
remained editable? I would like to disable those with entries while
allowing
new entries to still be entered in the column.
|