98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VALIDATION IN EXCEL VBA
VALIDATION IN EXCEL VBA
Resolved · Low Priority · Version 2003
Tony has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Access Intermediate course
Access Advanced course
VALIDATION IN EXCEL VBA
How do you create cell validation in VBA. My basic spreadsheet has validation rules in the sheet. However, on creating a new spreadsheet, the delete data routines clear the validations. Threrefore, I need to create validation rules against a list either on a sheet that is not changed or in the code
RE: VALIDATION IN EXCEL VBA
Hi Tony
Thanks for your question
It is possible to create validation rules in VBA. Simply create a procedure that checks the value of various cells and warns if they don't meet certain criteria, and then set it to run on the worksheet's change event.
Alternatively, in the example you have provided, why not create your workbook with all the validation rules in place and then save it as a template? Then every time you create a new instance of the template all the rules will be in place
Regards
Stephen
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Screen Splitters in ExcelScreen splitter icons can be set from the ribbon bar, or dragged from the scroll bars. The icon just above the up arrow on the right scroll bar controls the horizontal splitter; the icon to the right of the right arrow on the bottom scroll bar controls the vertical splitter. |