Select Range of Cells

P

programmingrookie

Within a single column, how would I set a range to be just the cells that
have data? I want to lock these cells using a change event, while leaving
the remainder of the cells editable. I'm trying to set one range as the
entire column, and a second range as cells with data, then using an intersect
to lock the cells with data. This should allow for continuous locking of
newly used cells.
 
B

Bob Phillips

Maybe use SpecialCells(xlCellTypeBlanks) to find the empty cells and lock
the column then unlock those
 
P

programmingrookie

I've figured out how to set my ranges to select those that are newly edited.
The problem I'm having now is with locking them. I want to protect my
worksheet before distributing it, and have the range to be edited as
unlocked. After edit, I want to lock only those cells that have been edited.
However, I get an error that it can't be done while the sheet is protected.
Is there anyway around this?
 
Top