Hello,
I have designed one userform in vba with 15 textboxes. On textbox change event, i want to give limitation to text value as textbox value does not exceed 400 and below 0, if the values will below 0 and above 400, it shows message popup as "Value out
of range". My problem i want to add this code to each textbox change event, so i want to do this on single click event to handle multiple textbox text change event.
For reference, attached herewith screenshot of application and code too.
Please tell me the solution.
Thanks & Regards
Rushali
Private Sub CommandButton1_Click()
If TB1.Text > 400 Or TB1.Text < 0 Then
MsgBox ("Value out of range")
Else
TB1 = ""
End If
End Sub