Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a group of cells that I have renamed cell1,cell2,cell3... and so on up to 30. I would like to take the number from the cell name and put it in a loop until it reaches 30. While it is in the loop, I would like each cell that matches the number to have protection placed on it. Any help would be great. Thanks. Matt
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range
Dim i as long for i = 1 to 30 set rng = Thisworkbook.Names("cell" & i).RefersToRange rng.locked = True next -- Regards, Tom Ogilvy "Matt" wrote in message ... I have a group of cells that I have renamed cell1,cell2,cell3... and so on up to 30. I would like to take the number from the cell name and put it in a loop until it reaches 30. While it is in the loop, I would like each cell that matches the number to have protection placed on it. Any help would be great. Thanks. Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing background colour when changing data in a cell | Excel Discussion (Misc queries) | |||
Conditional formatting changing relative when copied to other cell | Excel Worksheet Functions | |||
Problems changing cell formatting | Excel Discussion (Misc queries) | |||
Changing cell formatting with IF function | Excel Worksheet Functions | |||
get for loop to go on after blank cell? | Excel Programming |