Is there a validation method for user form textbox?
I would like to restrict data entered into a text box to numbers or letters only (depending on the textbox)?
Oscar,
I'm not an MVP but couln't you use a
Private Sub Txtbox3 After_Update
Loop until ISNUMERIC(Txtbox3.Value)=True
MsgBox "Enter a number dumby!",Vbokonly,"Stupid Person"
Txtbox3.Value=""
Cancel=True
Txtbox3.SetFocus
Do
End Sub
Just a thought
One of the MVPs probably have a better idea.
Thanks, Rib
Bartender:Hey aren't you that rope I threw out an hour ago?
There is no built in validation but there are several events where you can code your own - BeforeUpdate is the usual event for validation.
Enjoy,
Tony
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.