Hi, I wonder whether someone may be able to help me please.
I'm trying to incorporate the following code in my 'Workbook on Open' event.
[vba]If Range("B7:B").Value > 0 And .Value <> "Enter your name" Then
Set Rng1 = Application.Union(Cells(Target.Row, "C").Resize(, 28), Cells(Target.Row, "AE"))
Rng1.Locked = False
End If
[/vba]
The problem I'm having is that when I run this I receive 'compile error'
What I'm trying to achieve is if column B, starting at row 7 is populated and is not like "Enter your name", then unlock the row from columns C:AE, but I'm not quite sure where I've gone wrong.
I just wondered whether someone may be able to look at this please and let me knwo where I'm going wrong.
Many thanks and kind regards