hopelessliar
Technical User
I have a macro that effectively protects a cell from being changed (see below) which I simply recorded. What I want to do, is turn this into a loop so that where A69 is selected and compared against A18, A70 will be compared to A19 and so on. I KNOW this is simple but I can't get the hang of it so any help would be greatfully received.
Thanks guys
Range("A69"
.Select
With Selection.Validation
.Delete
.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=A18"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "You cannot change this cell"
.InputMessage = ""
.ErrorMessage = _
"To protect the integrity of Station Lists, Stations can only be changed between A15 and A50." & Chr(10) & "" & Chr(10) & "Any changes made will affect all other brands." & Chr(10) & "" & Chr(10) & "Luc"
.ShowInput = True
.ShowError = True
End With
Thanks guys
Range("A69"
With Selection.Validation
.Delete
.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=A18"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "You cannot change this cell"
.InputMessage = ""
.ErrorMessage = _
"To protect the integrity of Station Lists, Stations can only be changed between A15 and A50." & Chr(10) & "" & Chr(10) & "Any changes made will affect all other brands." & Chr(10) & "" & Chr(10) & "Luc"
.ShowInput = True
.ShowError = True
End With