I'm not sure that your use of the locked/unlocked cells
has anything to do with what you're asking.
I think the problems is with the range selection.
I tried this:
Private Sub ClearButton1_Click()
Dim ocell As Range
Range("G3").ClearContents
For Each ocell In Range("E5:E12")
ocell.ClearContents
Next ocell
End Sub
and it worked just fine.
the way you've defined your range:
Range("E5:E12", "G3").Select
Isn't giving you the results you expect.
it's actually selecting range E3:G12 (try using the debugger to step
through)
And, actually, it isn't strictly necessary to select the cells.