select whole sheet right click - > format-> protection uncheck locked
use this code
Sub lockcells()
ActiveSheet.Unprotect Password:="ashish"
ActiveCell.Locked = True
ActiveSheet.Protect Password:="ashish"
End Sub
you can uprotect the sheet then select the cell right clickit
On Tue, Feb 22,
thanks a lot ashish ji,
ashish ji, one question there is no way or macro if we just selected the
cells and run that or apply that macro (or formula) the cell turn locked for
the specific field
thanks
Rohan
On Tue, Feb 22, 2011 at 1:51 PM, ashish koul wrote:
> check the link
>
>
> http://supp
check the link
http://support.microsoft.com/kb/214081
vba code
it will lock the cells in a1 to a 60
Sub lockcells()
Sheets(1).Protect Password:="ashish"
Sheets(1).Unprotect Password:="ashish"
Sheets(1).Cells.Select
Selection.Locked = False
Sheets(1).Range("a1:a60").Locked = True
Sheets(1).Pro