Validation not working
On Fri, 4 Sep 2009 17:20:15 +0100, p45cal wrote:
The next thing to check is that the Selection corresponds to the cell
validation formula.
Another way to make sure that the cell formula refers to the selected
cell is to adjust the *.Add* line to:
Code:
--------------------
.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=AND(len(" & Selection.Address(0, 0) & ")=7,ISNUMBER(MID(" & Selection.Address(0, 0) & ",2,6)*1),CODE(LEFT(UPPER(" & Selection.Address(0, 0) & "),1))64,CODE(LEFT(UPPER(" & Selection.Address(0, 0) & "),1))<91)"
--------------------
Thanks again.
I have checked that from the beginning. The data being validated is in Col
B, in the current row (lCurRow) and the validation criteria is going in Col
D in the current row. The initial current row is 7, so the ID is going in
B7 and the validation criteria are going in D7.
Any other suggestions?
|