PDA

View Full Version : Solved: Adding a row of unlocked cells



dmkitz
02-05-2007, 09:59 AM
I am using this code to insert a row above and merge some of the cells of that row:

Dim Rw As Long, Cels As String
Selection.EntireRow.Insert
Rw = ActiveCell.Row
Cells(Rw, 1).Activate
Range(Cells(Rw, 1), Cells(Rw, 4)).MergeCells = True

The row that the code adds is always formatted so that the cells are locked. What should I add so that the cells will not be locked or hidden? Thanks.

OBP
02-05-2007, 10:30 AM
I don't know from memory, but you can just record a Macro Unlocking them and then use that in your code.