Why do you want to do this? hy don't you use Data Validation in Cell A10?

I'm sure that would have the same effect without having to use code.

Regards