Hello everyone,
I have over 176 Textboxes in a userfrom that I need to restrict the value to be numerical values between 1 and 176 textboxes an be blank if a value in any of the textbox is not between those value to alert user and set that textbox as setfocus.
Textbox3 thur Textbox178 are the textboxes that need the restriction. any help is greatly appreciated.
so instead doing the above 176 something better.
I have over 176 Textboxes in a userfrom that I need to restrict the value to be numerical values between 1 and 176 textboxes an be blank if a value in any of the textbox is not between those value to alert user and set that textbox as setfocus.
Textbox3 thur Textbox178 are the textboxes that need the restriction. any help is greatly appreciated.
VBA Code:
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsNumeric(TextBox3.Value) Then
MsgBox "only numbers allowed"
Cancel = True
End If
End Sub
so instead doing the above 176 something better.