A great question from Anat.
This lecture is about how to protect specific cells (lock them) so users can only access the cells you want them to have access to. Ideal if you have a list of some kind, where you only want the user to be able to add new entries, but not change any of the existing data.
What we do on a WorkbookOpen event, is lock everything except the first blank row, and also lock any cells in that row where we have formulas (so users can't break them!).
Next, we will add some automatic data validation. This will ensure that your users only input the kind of data that is expected in each column...so a date cell can only hold a date, for example.
If it turns out that the user has entered something incorrect, the validation routine will colour any errors in in red, so they are obvious to the user and they can correct them.
Nice and simple, and very useful!
Enjoy!
Protecting Specific Cells and Data Validation In VBA
This is a sample lecture from my course, Microsoft Excel Essentials: Level 3 - VBA Programming. This course is for Excel 2007, Excel 2010, Excel 2013 and Excel 2016, 2019 and 365
Get this course now!
Level 1: Microsoft Excel Essentials: Level 1 Basics - Excel Made Easy
The complete 4 hour course is yours for a low cost monthly subscription (first 2 months free!):
Level 2: Microsoft Excel Essentials: Level 2 - Intermediate/Advanced
The complete 9 hour course is yours for a low cost monthly subscription (first 2 months free!):
Level 3: Microsoft Excel Essentials: Level 3 - VBA Programming + Macros
The complete 13.5 hour course is yours for a low cost monthly subscription (first 2 months free!):
Alternatively, you can purchase the complete set in...
Excel Essentials: The Complete Excel Series - Level 1, 2 & 3
The WHOLE 27.5 Hour Excel Mastery Series In One! From Excel Novice To VBA Programmer...
Available to buy with lifetime access for just $16.99 (normally $200) here:
This course is for suitable Excel 2007, Excel 2010, Excel 2013, 2016, 2019 & 365
Videos in the Level 1 series:
Videos in the Level 2 series:
Videos in the Level 3 series:
Смотрите видео Excel VBA Protecting Specific Cells and Data Validation In VBA онлайн без регистрации, длительностью 11 минут 40 секунд в хорошем hd качестве. Это видео добавил пользователь Alan Jarvis 01 Июнь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3 тысяч раз и оно понравилось 9 людям.