Prevent users from entering data into a textbox

I have a textbox on an Excel worksheet that displays or doesn't display a message depending on a combobox selection.  How do I prevent users from manually entering data into the textbox?    I want to prevent them from being able to delete or change the message in the textbox (or from being able to create their own message).  In other words, I'm looking to lock the textbox from data entry other than what may populate it programmatically from the combobox selection.
dbfromnewjerseyAsked:
Who is Participating?
 
NorieConnect With a Mentor VBA ExpertCommented:
Here's the original workbook with a label replacing the textbox.
Test-file-for-EE-with-Label.xlsm
0
 
Mike in ITConnect With a Mentor IT System AdministratorCommented:
Why don't you change the text box into a label, then no one will be able to update it only the code that you write will be able to.
1
 
NorieVBA ExpertCommented:
If you want to stick with the textbox right click it, select Properties and set Enabled = False and Locked = True.
2
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.