I'm trying to add some validation to a VBA sub and I need to ensure the user enters a number and that it is no longer than the set limit, I'm pulling this in using a function as it varies depending on the team.
I can get the textlength
With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, Formula1:="0", Formula2:=ValidMaxLength
But obviously this can allow text.
Any help much appreciated.