XL2000: Visual Basic Macro for Validating Data upon Entry (213373)
The information in this article applies to:
This article was previously published under Q213373 SUMMARY
To automate a task or perform an operation when data is entered into a
specific range in a Microsoft Excel worksheet, you can use the OnEntry and Intersect methods in a Visual Basic for Applications macro. For example, you can use this type of macro to validate data entry by verifying that a value is within a specified range.
NOTE: The following sample macro runs in Excel 2000, but you do not need to use the macro to validate data that is entered into cells. Excel has a data-validation feature that allows you to specify what data is valid for certain cells and ranges.
REFERENCESFor additional information about getting help with Visual Basic for Applications, click the article number below
to view the article in the Microsoft Knowledge Base:
226118 OFF2000: Programming Resources for Visual Basic for Applications
For more information about the Intersect method, click Microsoft Visual Basic Help on the
Help menu, type intersect method in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
| Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
|---|
| Keywords: | kbdtacode kbhowto kbinfo kbProgramming KB213373 |
|---|
|