Hi,
I have a worksheet to be shared with other memeber of my company. There is information on the sheet that needs to be protected. I also have a text box on the sheet where individuals can put in comments. There is a text box and 2 commnad buttons (Mangers comments and Save). In order for a user to add comments they must press the managers command button and type in a p/w. Which works until I protect the worksheet. Once I protect the work sheet and try to access the Managers tab I get the following error message 'RUN TIME ERROR '1004' UNABLE TO SET LOCKED PROPERTY OF THE OLEOBHECT CLASS'
Is there anyway to protect the worksheet and still be able to insert comments into the text box. A copy of my macro is below.
Thank you
________
Private Sub CommandButton3_Click()
TextBox1.Enabled = False
TextBox1.Locked = True
End Sub
Private Sub CommandButton2_Click()
Dim Message, Title, Default, MyValue
Message = "PLEASE ENTER A VALID PASSWORD IN THE FIELD BELOW." ' Set prompt.
Title = "WARNING" ' Set title.
Default = "ENTER VALID PASSWORD HERE" ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)
If MyValue = "EPR05" Then
TextBox1.Enabled = True
TextBox1.Locked = False
Else
TextBox1.Enabled = False
TextBox1.Locked = True
End If
End Sub
Private Sub TextBox1_change()
End Sub
Bookmarks