Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform with validation...
I have a textbox on my userform that I am trying to add validation to i.e.
only allow a whole number between 1 - 21. I have recorded a macro to show me the correct(?) code but I don't seem to be able to make the textbox the active control apart from to take the focus? With Selection.Validation .Delete .Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, Formula1:="1", Formula2:="21" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "Error" .InputMessage = "" .ErrorMessage = _ "You are trying to exced the total cube of the container 65,000 m3? Please enter a figure between 1 - 21" .ShowInput = True .ShowError = True End With Please help if your able Mark(InWales) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UserForm Date Validation | Excel Programming | |||
putting validation to TextBox in the userform | Excel Programming | |||
putting validation to TextBox in the userform | Excel Programming | |||
Userform Validation | Excel Programming | |||
Userform Date validation | Excel Programming |