By default the property of all cells in a worksheet are set to Locked=true.
If you don't want specific cells to be locked then set their locked property to false
for example
VB Code:
'assuming this is the range you want to unlock
Range("A1:F1").Select
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
or if you don't want just the column headings to be changed then select all cells in the worksheet. Set the entire cells locked property to false and then change the property of the relevant cells to true
for example...
VB Code:
'entire worksheet
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = False
'assuming this is the range you want to unlock
Range("A1:E1").Select
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Hope this helps...