Validating event of textbox

Is it the location of a file (such as C:\Program Files\Homework)?Are you expecting a Yes/No True/False type of answer (if so how should the user provide it)?Is it a date (if it is a date, what format is the user supposed to enter)?

validating event of textbox-4

An input box displays a title, a message to indicate the requested value, a text box for the user, and two buttons: OK and Cancel.

Here is an example: When an input box displays, it presents a request to the user who can then provide a value.

After using the input box, the user can change his or her mind and press Esc or click Cancel.

Here is an example: This would produce When reading the message on the Input box, the user is asked to enter a piece of information.

The type of information the user is supposed to provide depends on you, the programmer.

Therefore, there are two important things you should always do.First you should let the user know the type of information requested. Is it a string (such as the name of a country or a customer's name)?If the user provided a value and want to acknowledge it, he or she can click OK or press Enter.This would transfer the contents of the text box to the application that displayed the input box.Public Function Input Box( _ By Val Prompt As String, _ Optional By Val Title As String = "", _ Optional By Val Default Response As String = "", _ Optional By Val Xpos As Integer = -1, _ Optional By Val YPos As Integer = -1 _ ) As String This would produce When calling the Input Box() function, if you pass only the first argument, the input box would display the name of the application in the title bar.If you want, you can specify your own caption through the Title argument.

Tags: , ,