Hi All,
I have learned that using merged cells is not a good idea with excel. But, my workbook has grown too big to undo the merged cells. I have a protected workbook with some cells locked, some unlocked. I want the unlocked cells to lock once data has been entered. When I use the following code on the un-merged cells, it works fine:
But If I make the range include merged cells (B5:G100), ie Range("A5:O100"), then it fails.
I saw in another thread someone locking merged cells for someone else probelm using this:
First check if the cell is merged, such as:
If cell.MergeCells = True
If it is, set a range object to the merged range, such as:
Set mergedRange = cell.MergeArea
Then simply set the locked status of the merged range object, such as:
mergedRange.Locked = True
Is there someone that could edit my code to combine the merged cell check?
Thanks
Bookmarks