Lotus 1-2-3 Release 1.5 Data Validation Add-In This file explains how to use the 1-2-3 Data Validation Add-in and contains information that is not included in the online Help or printed documentation. This file contains the following sections: 1. Overview 2. Installing and loading the add-in 3. Restricting cell contents to numbers 4. Restricting cell contents to dates or times 5. Restricting cell contents to items in a list 6. Restricting character length of cell contents 7. Using a formula to restrict cell contents 8. Displaying an input message 9. Displaying an error message 10. Changing restrictions on cell contents 11. Removing restrictions on cell contents 12. Using the CreateValidation function 13. Sharing files that contain validation settings ----------- 1. Overview ----------- The 1-2-3 Data Validation Add-in lets you set criteria to restrict the type of data that users can enter in a cell or range of cells. You can also make 1-2-3 display an input message when the user selects a cell, and display an error message when the user tries to enter invalid data in a cell. For example, you can set a cell to accept only dates that occur between a particular start date and end date, and make 1-2-3 display an explanatory message when the user selects the cell. If the user tries to enter data that doesn't meet this condition, you can set 1-2-3 to display a message that says the data isn't valid. With the Data Validation Add-in, you restrict cell entries by making sure that the type of data entered meets a particular condition. For example, you can: - Restrict cell entries to whole numbers, decimals, dates, or times, and set limits on the allowed values. - Restrict cell entries to a list of valid items. - Restrict the number of characters allowed in cell entries. - Use a logical formula to evaluate whether a cell entry meets a particular condition. The Data Validation Add-in works with 1-2-3 Release 1.5 or later. >Setting criteria to restrict cell contents ------------------------------------------- Before you set criteria: When setting up a sheet for data entry, make sure you complete all structural changes to the sheet before you use the Data Validation Add-in to specify the criteria and other validation settings. If you move cells that the validation settings rely on, 1-2-3 may not be able to validate data entries as you intended. Specifying allowed values: When you set criteria to restrict data entry in a selected range, the same criteria applies to each cell in the selection. You cannot specify criteria for more than one selected range at a time. The Data Validation dialog box contains settings that let you specify the required data type and the limits for the allowed values. When you specify allowed values in the dialog box, you can either type the values, or reference the cells that contain the values. When referencing cells, it's a good idea to use a range name instead of a cell address -- then, if you inadvertently move the cells, or need to add or remove cells in a range, the criteria settings will automatically reflect the change. You may also want to hide the sheet that contains the allowed values since users don't need to see it to enter data. Data validation range names: 1-2-3 uses a range name to identify each cell for which you specify criteria, and assigns a default name unless the cell already has an assigned name. The first cell is named DV_1, the second is named DV_2, and so on. 1-2-3 stores information about the criteria and other settings in a hidden sheet named DataValidation. Caution: To avoid unexpected results from incorrect validation, do not rename or delete any of the range names created by the add-in, or change or move the data stored in the hidden sheet. Avoiding invalid data entry The Data Validation Add-in only restricts the type of data that users can type in an individual selected cell. It does not prevent users from entering invalid data in other ways such as moving a value by dragging or pasting into a range of cells. To avoid this problem, you can: - Tell users to enter data by typing in one cell at a time. - Use 1-2-3 Preferences (General tab) to turn off "Drag and drop cells and sheets." ------------------------------------ 2. Installing and loading the add-in ------------------------------------ The Data Validation Add-in is not installed by the Install program. If you have the SmartSuite Release 1.5 CD-ROM, you can install the Data Validation Add-in from there. If not, you can download the add-in from the World Wide Web. Installing the add-in from the CD-ROM: 1. Insert the SmartSuite CD-ROM in your CD-ROM drive. 2. Open an OS/2 command prompt window and type X: (where "X" represents the drive letter of your CD-ROM drive) and then press ENTER. 3. Copy the file DATAVAL.12A located on the CD-ROM in the \EXTRA\123\DATAVAL directory to the \LOTUSW4\WORK\123 directory on your hard disk. Installing the add-in from the World Wide Web: You can also obtain the add-in from the SmartSuite for OS/2 Web site located at http://www.lotus.com/smartsuiteos2. Click on the "Downloads" link at the bottom of the SmartSuite for OS/2 home page. Loading the add-in in 1-2-3: After you install the Data Validation Add-in, you must register and load the add-in file in 1-2-3 before you can set criteria for data entry. 1. From the 1-2-3 File menu, choose Add-Ins, and then choose Manage Add-Ins. The Manage Add-Ins dialog box lists the add-in files that are registered with 1-2-3. 2. If DATAVAL.12A does not appear in the add-ins list, click Register, select DATAVAL.12A, then click Open to close the Register Add-in dialog box. 3. Click DATAVAL.12A to mark it for loading. 4. Click Done. After you load the add-in, the Data Validation command appears on the Range menu. Now, each time you start 1-2-3, the add-in will be automatically loaded into memory. Note: For the Data Validation Add-in to work, the "Run file Opened scripts, autoexec macros" option must be selected on the General panel in the 1-2-3 Preferences dialog box. By default, this option is selected. To make sure this option is selected, choose File - User Setup - 1-2-3 Preferences. If you don't want the add-in loaded each time you start 1-2-3, choose File - Add-Ins - Manage Add-Ins, select DATAVAL.12A (to remove the check mark), and click Done. If you decide to uninstall 1-2-3, the Uninstall program will not automatically remove the Data Validation Add-in. Instead, you will need to manually delete the add-in file. >Details: Installing and loading the add-in ------------------------------------------- The Data Validation Add-in must be loaded before users begin entering data in restricted cells; otherwise, 1-2-3 cannot check that the data entered is valid. To ensure proper data validation, you can add the following code to the LotusScript Opened event for the workbook that contains the validation settings: Dim appflag As Variant appflag = CurrentApplication.IsAddinLoaded("dataval.12a") On Error Goto message If appflag = False Then CurrentApplication.Loadaddin("dataval.12a") Msgbox "The Data Validation Add-in was not loaded, so 1-2-3 loaded it for you. " &_ "To ensure proper validation, please close and reopen all files before you enter " &_ "or edit any data." End If Exit Sub Message: Msgbox "The Data Validation Add-in was used to set criteria for data entry " &_ "in this file. To ensure that the data you enter is valid, please load the add-in " &_ "(dataval.12a) before editing this file." Resume Next --------------------------------------- 3. Restricting cell contents to numbers --------------------------------------- You can restrict cell entries to integers or decimals. Allowed values can be positive or negative. 1. Select the cell or range where you want to specify criteria for data entry. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. From the "Entry can be" list, select "Whole number" or "Decimal." 4. From the "Parameter" list, select an operator. 5. Specify the value limits. For example, if you selected "Between" in step 4, specify a minimum and a maximum. 6. To allow the selected cell or range to be blank, select "Allow blank entry." 7. (Optional) Specify an input message. For details, see "Displaying an input message" below. 8. (Optional) Specify an error message for invalid data entry. For details, see "Displaying an error message" below. 9. Click OK. >Details: Restricting cell contents to numbers ---------------------------------------------- Using number formats: Restricting the type of data users can enter has no effect on number formats. As long as users enter a valid number, they can use any number format that 1-2-3 recognizes. For example, if you restrict cell entries to whole numbers between 1 and 5, users can type 5, $5.00, or 5.00E+000. Criteria options in the Data Validation dialog box: Allow blank entry -- Lets users specify a value or leave the cell blank. Note: If you don't select "Allow blank entry" and a user subsequently deletes data from the cell, 1-2-3 displays a data validation warning if the "Show error message if invalid data is entered" option is turned on. Parameter - Between -- Lets users enter a value that is greater than or equal to the specified minimum, and less than or equal to the specified maximum. - Not between -- Lets users enter a value that is less than the specified minimum, or greater than the specified maximum. - Equal to -- Lets users enter a value that matches the specified value. - Not equal to -- Lets users enter any value except the specified value. - Greater than -- Lets users enter a value that is larger than the specified minimum. - Less than -- Lets users enter a value that is smaller than the specified maximum. - Greater than or equal to -- Lets users enter a value that is larger than or the same as the specified minimum. - Less than or equal to -- Lets users enter a value that is smaller than or the same as the specified maximum. Value text boxes -- Depending on the parameter you select, the Data Validation dialog box displays one or two text boxes where you can specify the value limits. You can: - Type the value in the text box. - Type the name or address of a cell that contains either the value or a formula that results in the value. - Click the range selector (next to the text box) and then select a cell that contains the value. - Click the range selector and then select a cell that contains a formula that results in the value. Note: You cannot specify a range or collection, or a cell in a different workbook. To refer to data in a different workbook, create a file link in a cell, and then specify that cell address in the text box. For example, if the maximum value is stored in cell A5 in sheet B, you can type B:A5 in the text box instead of typing the actual maximum value. ---------------------------------------------- 4. Restricting cell contents to dates or times ---------------------------------------------- When you restrict cell entries to a date or time, users can enter a date or time using any 1-2-3 format. 1. Select the cell or range where you want to specify criteria for data entry. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. From the "Entry can be" list, select "Date" or "Time." 4. From the "Parameter" list, select an operator. 5. Specify the value limits. For example, if you selected "Date" in step 3 and "Between" in step 4, specify a start date and an end date in the appropriate text boxes. 6. To allow the selected cell or range to be blank, select "Allow blank entry." 7. (Optional) Specify an input message. For details, see "Displaying an input message" below. 8. (Optional) Specify an error message for invalid data entry. For details, see "Displaying an error message" below. 9. Click OK. >Details: Restricting cell contents to dates or times ----------------------------------------------------- Specifying date or time criteria: Depending on the parameter that you select, the Data Validation dialog box displays one or two text boxes where you can specify the date or time limits. You can: - Type a date or time in the text box. - Type the address or name of a cell that contains either a date or time. - Click the range selector (next to the text box) and then select a cell that contains a date or time. - Click the range selector and then select a cell that contains a formula that results in a date or time number. Note: You cannot specify a range or collection, or a cell in a different workbook. To refer to data in a different workbook, create a file link in a cell, and then specify that cell address in the text box. When specifying date limits, use either a date number or a date in one of these formats: - 12/31/96 - 12/31 (1-2-3 assumes current year) - 31-Dec (1-2-3 assumes current year) - December 31, 1996 For example, if the earliest valid date is January 1, 1998, you can use 35796 (the date number), 1/1/98, or January 1, 1998. If you prefer to store the date in a cell and then reference that cell in the Data Validation dialog box, you must format the cell using either the 12/31/96 or December 31, 1996 date format. To specify time limits, you can use either a time number or any 1-2-3 time format. Entering dates in a restricted cell: When you set the data entry criteria to "Date," users can enter a value by using a Date format from either the Frequently Used list in the 1-2-3 status bar or the list below: - 12/31/96 - 12/31/1996 - 31-Dec-96 - Dec-96 If you want users to be able to enter dates in a restricted cell using a different format, you must either preformat the cell or add the format to the Frequently Used list in the status bar. To see the Frequently Used list, click the Number Format button in the status bar. Entering times in a restricted cell: When you set the data entry criteria to "Time," users can enter a value by using a Time format from either the Frequently Used list in the 1-2-3 status bar or the list below: - 10:59:59 PM - 10:59 PM - 22:59:59 - 22:59 If you want users to be able to enter times in a restricted cell using a different format, you must either preformat the cell or add the format to the Frequently Used list in the status bar. To see the Frequently Used list, click the Number Format button in the status bar. ----------------------------------------------- 5. Restricting cell contents to items in a list ----------------------------------------------- You can restrict entries in a cell by letting users select items from a list that you define -- for example, cities where your organization has offices. 1. Select the cell or range where you want to specify criteria for data entry. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. From the "Entry can be" list, select "List item." 4. To specify the allowed entries, do one of the following: - In the Items box, type the valid entries, separated by a comma or semicolon, with no spaces between items -- for example, New York,Paris,London,Hong Kong and so on. - In the Items box, type the address or name of the range that contains the valid items. - Click the range selector button (next to the Items box), then select the range that contains the valid items. 5. To display a button in the sheet that the user can click to see the list of valid items, select "Display drop-down list in cell." 6. To allow the selected cell or range to be blank, select "Allow blank entry." 7. (Optional) Specify an input message. For details, see "Displaying an input message" below. 8. (Optional) Specify an error message for invalid data entry. For details, see "Displaying an error message" below. 9. Click OK. >Details: Restricting cell contents to items in a list ------------------------------------------------------ Storing list data in a range: To set up list items in a range that you can specify in the Data Validation dialog box, type the entries in a range. Type one entry per cell and do not include any semicolons. You can specify up to 200 list items in a range. Specifying numbers as text in list data: When you want to enter a number as text in a cell, you include a label-prefix character such as ' (apostrophe). To make sure 1-2-3 treats a number as text in a drop-down list, you need to include an extra label-prefix character. For example, to create a drop-down list that contains a series of cost centers (225, 376, 458, and 509), you must type 2 label-prefix characters before each cost center. If you omit the second label-prefix character, when the user selects a cost center from the drop-down list, 1-2-3 will interpret the item as a formula and display the result in the current cell. Similarly, if you type the list items directly in the Data Validation dialog box, you must type a label-prefix character before each cost center. The additional label-prefix character appears in the drop-down list but not in the cell after the user selects the item. ------------------------------------------------ 6. Restricting character length of cell contents ------------------------------------------------ You can restrict the number of characters from 1 to 511 that users can enter in a cell. For example, you can check that the cell where the user enters a telephone number always contains the correct number of digits. 1. Select the cell or range where you want to specify criteria for data entry. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. From the "Entry can be" list, select "Text length." 4. From the "Parameter" list, select an operator. 5. Specify the length limits. For example, if you selected "Equal to" in step 4, specify the length you want. 6. To allow the selected cell or range to be blank, select "Allow blank entry." 7. (Optional) Specify an input message. For details, see "Displaying an input message" below. 8. (Optional) Specify an error message for invalid data entry. For details, see "Displaying an error message" below. 9. Click OK. >Details: Restricting character length of cell contents ------------------------------------------------------- Specifying text length limits: Depending on the parameter you select, the Data Validation dialog box displays one or two text boxes where you can specify the length limits. You can: - Type the value in the text box. - Type the name or address of a cell that contains either the value or a formula that results in the value. - Click the range selector (next to the text box) and then select a cell that contains the value. - Click the range selector and then select a cell that contains a formula that results in the value. Note: You cannot specify a range or collection, or a cell in a different workbook. To refer to data in a different workbook, create a file link in a cell, and then specify that cell address in the text box. For example, if the maximum allowed length is stored in a cell named maxchars, you can type maxchars in the text box instead of typing the actual value. Using a formula to enter data in a restricted cell: If a formula is used to enter data in the restricted cell, 1-2-3 checks the character length of the formula result and not the formula itself. -------------------------------------------- 7. Using a formula to restrict cell contents -------------------------------------------- You can use a logical formula to determine whether a cell entry is valid. For example, you can check that the salary increase for an individual employee doesn't make the total for all requested increases exceed the amount budgeted. 1. Select the cell or range where you want to specify criteria for data entry. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. From the "Entry can be" list, select "Custom." 4. In the "Logical formula" box, do one of the following: - Type a logical formula. - Type the address or name of a cell that contains the logical formula. - Click the range selector button (next to the text box), then select the cell that contains the logical formula. 5. To allow the selected cell or range to be blank, select "Allow blank entry." 6. (Optional) Specify an input message. For details, see "Displaying an input message" below. 7. (Optional) Specify an error message for invalid data entry. For details, see "Displaying an error message" below. 8. Click OK. >Details: Using a formula to restrict cell contents --------------------------------------------------- Using logical formulas: A logical formula evaluates whether a condition is true or false. The formula results in 1 if the condition is true, or 0 if the condition is false. When you use a logical formula to validate a cell entry, 1-2-3 allows the entry only when the formula evaluates to 1, indicating that the condition is true. You can use these operators in a logical formula: Operator Description -------- ----------- = equal to < less than > greater than <> not equal to <= less than or equal to >= greater than or equal to #AND# AND #NOT# NOT #OR# OR For example, if C5 sums the values entered in C1..C4, and you want to make sure that the total doesn't exceed 11500, you can use the logical formula +C5<=11500 to validate data entered in C1, C2, C3, and C4. Then the user can enter a value in any of these cells as long as the total in C5 is less than or equal to 11500. ------------------------------ 8. Displaying an input message ------------------------------ When users select a cell, you can have 1-2-3 display a message that you specify. For example, you can prompt users to type their employee ID. 1-2-3 displays the message until the user selects a different cell. 1. Select the cell or range where you want to specify an input message. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. Specify the data entry criteria in the dialog box. Note: To display an input message without restricting data entry, select "Any value" from the "Entry can be" list. 4. Select "Show input message when cell is selected." 5. Click Message Text. 6. In the "Input message text" box, enter the message (up to 511 characters). If needed, press ENTER to start a new line. If you don't specify a message, 1-2-3 displays a default message. 7. Click OK to close the Message Text dialog box. 8. Click OK. To remove an input message, select the cell or range for which you set the message, choose Range - Data Validation, and deselect "Show input message when cell is selected." ------------------------------ 9. Displaying an error message ------------------------------ When users enter data that doesn't match the criteria you specified, you can make 1-2-3 display a message. There are three different message types to choose from. 1. Select the cell or range where you want to specify an error message. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. Specify the data entry criteria in the dialog box. 4. Select "Show error message if invalid data is entered." 5. Click Message Text. 6. From the "Error message type" list, select a message type. 7. Enter a title for the error box. 8. Enter the error message text. If needed, press ENTER to start a new line. If you don't specify a message, 1-2-3 displays a default message. 9. Click OK to close the Message Text dialog box. 10. Click OK. >Details: Displaying an error message ------------------------------------- Error message options in the Message Text dialog box: Error message type -- The type of message you select determines how 1-2-3 behaves. - Stop -- Prevents users from entering data that does not meet the specified criteria. Displays the specified message with Retry and Cancel buttons. Clicking Retry lets the user edit the invalid entry. Clicking Cancel removes the invalid entry. - Warning -- Displays the specified message, and asks if the user wants to continue. Contains Yes, No, and Cancel buttons. Clicking Yes makes 1-2-3 accept the invalid entry. Clicking No lets the user edit the invalid entry. Clicking Cancel removes the invalid entry. - Information -- Displays the specified message with OK and Cancel buttons. Clicking OK makes 1-2-3 accept the invalid entry. Clicking Cancel removes the invalid entry. Error box title -- Lets you specify the title (up to 511 characters) displayed in the message box. If you don't enter a title, the title bar automatically displays Lotus 1-2-3. Error message text -- Lets you specify the text (up to 511 characters) displayed in the message box. If you don't enter any text, 1-2-3 displays a default invalid data message. Removing an error message: To remove an error message, select the cell or range for which you set the message, choose Range - Data Validation, and deselect "Show error message if invalid data is entered." ------------------------------------------ 10. Changing restrictions on cell contents ------------------------------------------ 1. Select the cell or range where you want to change the criteria for data entry. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. Change the data entry criteria in the Data Validation dialog box. 4. Click OK. Note: Once you assign or change a data validation setting, you cannot choose Edit - Undo to undo the change. ------------------------------------------ 11. Removing restrictions on cell contents ------------------------------------------ 1. Select the cell or range where you want to remove all restrictions on cell contents. 2. From the Range menu, choose Data Validation. If you don't see the Data Validation command, you need to load the Data Validation Add-in. 3. In the Data Validation dialog box, click Clear All. 1-2-3 resets the criteria to "Any value" and clears any associated input and error messages. 4. Click OK. --------------------------------------- 12. Using the CreateValidation function --------------------------------------- You can also use the script function described below with the Data Validation Add-in to control the type of data that can be entered in a cell or range, and to specify optional input and error messages. CreateValidation datarange,validtype,parameter,limit,blankok,incelllist,errcheck, errtype,errtitle,errmessage,inputcheck,inputmessage Arguments: datarange specifies the cell or range where you want to specify criteria for data entry. datarange is a cell address or range name, entered as text enclosed in " " (quotation marks). datarange must be in the same file in which the script is running. validtype specifies the type of data you want to allow. validtype is one of the following values, entered as text enclosed in " " (quotation marks): validtype 1-2-3 --------- ----- Any value Places no restrictions on data entry. List item Restricts entries to items in a specified list. Whole number Restricts entries to whole numbers (positive or negative). Decimal Restricts entries to decimals (positive or negative). Date Restricts entries to dates entered in a 1-2-3 format. Time Restricts entries to times entered in a 1-2-3 format. Text length Restricts entries to the specified number of characters. Custom Restricts entries to values allowed by a logical formula. parameter specifies the operator when validtype is not set to "Any value," "List item," or "Custom." parameter is one of the following values, entered as text enclosed in " " (quotation marks): parameter 1-2-3 --------- ----- Between Accepts a value that is greater than or equal to the specified minimum, and less than or equal to the specified maximum. Not between Accepts a value that is less than the specified minimum, or greater than the specified maximum. Equal to Accepts a value that matches the specified value. Not equal to Accepts any value except the specified value. Greater than Accepts a value that is larger than the specified minimum. Less than Accepts a value that is smaller than the specified maximum. Greater than or equal to Accepts a value that is larger than or the same as the specified minimum. Less than or equal to Accepts a value that is smaller than or the same as the specified maximum. limit specifies the value limits and is entered as text enclosed in " " (quotation marks). If validtype is "List item," limit is either a list of values delimited by semicolons, or the name or address of a range that contains the values. Otherwise, limit is either a single value (indicating the value to match) or a 2-value list delimited by a semicolon (indicating the minimum and maximum values). blankok specifies whether to allow a blank entry in the cell. blankok is one of the following values: blankok 1-2-3 ------- ----- 1 Allows a blank entry in the cell. 0 Requires a non-blank entry in the cell. incelllist specifies whether to display a drop-down button in the selected cell when validtype is "List item." incelllist is one of the following values: incelllist 1-2-3 ---------- ----- 1 Displays drop-down button. 0 Hides drop-down button. errcheck specifies whether to display an error message when invalid data is entered. errcheck is one of the following values: errcheck 1-2-3 -------- ----- 1 Displays error message. 0 Turns off error message. errtype specifies the type of error message to be displayed. errtype is one of the following values, entered as text enclosed in " " (quotation marks): errtype 1-2-3 ------- ----- Stop Displays specified message with Retry and Cancel buttons. Warning Displays specified message with Yes, No, and Cancel buttons. Information Displays specified message with OK and Cancel buttons. errtitle specifies the title you want displayed in the error message box. errtitle is text enclosed in " " (quotation marks) and can contain up to 511 characters. If no title is needed, errtitle is an empty set of quotation marks. errmessage specifies the text you want displayed in the error message box. errmessage is text enclosed in " " (quotation marks) and can contain up to 511 characters. If no error message text is needed, errmessage is an empty set of quotation marks. inputcheck specifies whether to display a message when the cell is selected. inputcheck is one of the following values: inputcheck 1-2-3 ---------- ----- 1 Displays input message. 0 Turns off input message. inputmessage specifies the input message text. inputmessage is text enclosed in " " (quotation marks) and can contain up to 511 characters. If no input message text is needed, inputmessage is an empty set of quotation marks. Notes: - When you are working in a file and the Data Validation Add-in is loaded, you must specify a Use statement before you can use the CreateValidation function. 1. From the Edit menu, choose Scripts & Macros, and then choose Show Script Editor. 2. From the Object list, select "(Globals)." 3. From the Script list, select "(Options)." 4. Enter the following statement, substituting the appropriate path to the add-in file: Use "c:\lotusw4\work\123\dataval.12a" - When using the CreateValidation function, you must supply values of the correct data type, even if they are blank. For example, if you use "List item" as validtype to restrict cell contents to items in a drop-down list, you must pass an empty set of quotation marks for parameter instead of omitting the argument (even though you do not use operators such as "Between" or "Equal to" with list validation). This is a LotusScript limitation in building custom functions and subs. - To create input messages only, you must include values for validtype and parameter instead of empty quotation marks. For example: CreateValidation "b5","Any value","Between","",0,0,0,"","","",1,"my input message" - When you use the CreateValidation function to set criteria for data entry, 1-2-3 does not check the arguments that you specify. For example, if you restrict a cell to accept only dates within a particular period, 1-2-3 does not check that the start date you specify is earlier than the end date. Example: The example below restricts data entry in cell B2 to items in a defined list of cities. When the user selects cell B2, 1-2-3 displays an input message and a button that displays a list of valid city names. If the user tries to enter an invalid city name, 1-2-3 displays an error message. CreateValidation "b2","List item","","New York;Paris;London;Hong Kong", 1,1,1,"Stop","Data Entry Error", "You entered an invalid city name.",1, "Click the button, then select an item from the displayed list." -------------------------------------------------- 13. Sharing files that contain validation settings -------------------------------------------------- The Data Validation Add-in is designed for use with 1-2-3 Release 1.5 or later. If you set criteria for data entry and then save the file as a 1-2-3 97 .123 file or a 1-2-3 for OS/2 Warp 4 .123 file, the validation settings will be retained. However, you can only use the settings if you reopen the file in 1-2-3 Release 1.5 or later. If you set criteria for data entry and then save the file as a .wk4, .wk3, or .wk1 file, the validation settings will be lost.