Hi all, first post here. i'm Wonky1 from winkywankywoo (lol?), and although i've had a little experience with Excel, i'm a complete novice with vba.
Using Excel 2007 and Windows Vista, i've been trying to find a way of temporarily protecting a cell if it has a certain value, until a different cell has another certain value, for example:
A1 = "lemon"
A6 = "tiger"........
A6 then changes to "rhino", and now i want to hold A6 = "rhino" until A1 = "apple" or anything else apart from "lemon".
i'm hoping there's a way of coding to achieve this, but i'm stuck. i'd also like to apply "the formula" (if there is one) to a range of cells that behave in the same way as A6, so that individual cells in A6:A24 become temporarily fixed if they say "rhino" when A1 = "lemon".
This is a bit of code i've come up with so far, but it returns
Run-time error '424':
Object required
Novice!
Sub fruit()
If cell.A1 = "lemon" & cell.A6 = "rhino" Then
cell.A6.Locked = True
Else
cell.A6.Locked = False
End If
End Sub
Apologies if this has been covered elsewhere, but any help, guidance, or suggestion would really be appreciated.
Thanks for reading, and Thanks even more for any response
Using Excel 2007 and Windows Vista, i've been trying to find a way of temporarily protecting a cell if it has a certain value, until a different cell has another certain value, for example:
A1 = "lemon"
A6 = "tiger"........
A6 then changes to "rhino", and now i want to hold A6 = "rhino" until A1 = "apple" or anything else apart from "lemon".
i'm hoping there's a way of coding to achieve this, but i'm stuck. i'd also like to apply "the formula" (if there is one) to a range of cells that behave in the same way as A6, so that individual cells in A6:A24 become temporarily fixed if they say "rhino" when A1 = "lemon".
This is a bit of code i've come up with so far, but it returns
Run-time error '424':
Object required
Novice!

Sub fruit()
If cell.A1 = "lemon" & cell.A6 = "rhino" Then
cell.A6.Locked = True
Else
cell.A6.Locked = False
End If
End Sub
Apologies if this has been covered elsewhere, but any help, guidance, or suggestion would really be appreciated.
Thanks for reading, and Thanks even more for any response
