Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your reply!
While attempting to figure out your code, I'm curious as to why: 1) are you using Resize 2) is the Rows.Count -61, rather then Rows.Count, 62 Ken "Chip Pearson" wrote in message ... By default, all cells are locked, so you first need to unlock everything and then selectively lock the desired ranges. E.g., Sub AAA() Dim WS As Worksheet Set WS = Worksheets("Sheet1") With WS .Cells.Locked = False .Cells(1, "J").Resize(.Rows.Count, 1).Locked = True .Cells(62, "A").Resize(.Rows.Count - 61).Locked = True .Protect End With End Sub Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Sat, 12 Sep 2009 11:58:49 -0700, "Ken" wrote: I would like to lock all cells starting from J1 to infinity and from A62 to infinity using VB. Anyone have any ideas? Ken |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to plot an infinity point in Excel | Excel Discussion (Misc queries) | |||
trouble locking specific cells | Excel Worksheet Functions | |||
Locking specific cells in a workbook | Excel Discussion (Misc queries) | |||
locking formula in cells in without locking whole sheet | Excel Discussion (Misc queries) | |||
Locking Specific Cells | Excel Programming |