![]()
With Sheets("Sheet1") .Unprotect "password" .Cells.Locked = False .Columns(1).Locked = True .protect "password" End With
![]()
With Sheets("Sheet1") .Unprotect "password" .Cells.Locked = False .Columns(1).Locked = True .protect "password" End With
![]()
With Sheets("Sheet1") .Unprotect "password" .Cells.Locked = False .Columns("1:2").Locked = True .protect "password" End With
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
thanks i am getting an error
Run time error '1004'
Application defined or object defined error
![]()
With Sheets("Sheet1") .Unprotect "password" .Cells.Locked = False .Columns("1:2").Locked = True ----------->error here .protect "password" End With
![]()
.Columns("A:B").Locked = True
Thanks for an help![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks