Locking cells requires the use of worksheet protection or a method to cancel the user action if the active cell is in the target raneg (i.e. A2:A0).
There is almost always more than one way to go about things in VBA.
Here is a very simple approach that avoids the use of sheet protection.
It uses the worksheet_selectionchange event to detect if the user selects a cell in the range of A2:A9 and, if so, check cell A1 for a specific value (e.g. 10) and automatically moves the cell pointer to cell A10 and displays a message.
The code must be put in the worksheet module (rightclick sheet tab > View Code - copy and paste code to VB Editor and adjust references as needed).
Bookmarks