Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to insert comments in protected worksheet?

Generally speaking, it is easy for us to insert comments into cells of the unprotected worksheet. But sometimes you need to set password to protect your worksheet and want to insert comments in the protected sheet as well. How could you do this in Excel?

Insert comments in protected worksheet with checking Edit Objects option

Insert comments in protected worksheet with VBA code

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial


arrow blue right bubble Insert comments in protected worksheet with checking Edit Objects option


To insert comments in protected worksheet, you can check the Edit Objects option while you are protecting your worksheet. Please do as follows:

1. Click Review > Protect Sheet, see screenshot:

doc-insert-comments-in-protected-sheet-1

2. In the Protect Sheet dialog, enter your password into the Password to unprotect sheet text box, and then scroll down and check Edit objects option in the Allow all users of this worksheet to list box, see screenshot:

doc-insert-comments-in-protected-sheet-1

3. Then click OK, and reenter your password in the Confirm Password dialog.

doc-insert-comments-in-protected-sheet-1

4. And then click OK to close the dialogs, and now your worksheet has been protected, but you can insert comments into this worksheet.

Note: With this method, you just not only can insert comments, but also can insert other objects, such as pictures, charts and so on.


arrow blue right bubble Insert comments in protected worksheet with VBA code

Except to check the Edit objects option when you protect worksheet, you can apply the following VBA code as well. The following VBA will help you insert a comment into a cell and then protect the worksheet. Please do as this:

1. Click a cell which you want to insert a comment.

2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

3. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Insert comments in protected worksheet

Public Sub InsertComment()
'Update 20140723
Dim xPW As String
Dim xComment As String
xPW = “123456”
xTitleId = "KutoolsforExcel"
xComment = Application.InputBox("Input comments", xTitleId, "", Type:=2)
Application.ActiveSheet.Unprotect Password:=xPW
Application.ActiveCell.AddComment
Application.ActiveCell.Comment.Text Text:=xComment
ActiveSheet.Protect Password:=xPW
End Sub

4. Then press F5 key to execute this code, and prompt box will pop out, in the box, please enter your comment content as you need, see screenshot:

doc-insert-comments-in-protected-sheet-1

5. Click OK to close this box, and your comment has been inserted into the specified cell and your current worksheet is protected at the same time.

doc-insert-comments-in-protected-sheet-1

Notes:

1. You can modify the password to your own in xPW = “123456” of the above code.

2. If you want to insert another comment, just select a cell and run this code again, then enter the comment content.


Related articles:

How to filter cells with comments in Excel?

How to group and ungroup rows in protected worksheet?


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    locento mumbai · 9 months ago
    This is the first time when i found these kind of interesting post on blog. Thanks.

    female escorts in mumbai

    mumbai escorts
  • To post as a guest, your comment is unpublished.
    Alex Cole · 1 years ago
    Some prefer use excel online to easily access their work. But it is possible your data might get harmed. To know better ways to secure your data follow: Internet Explorer 10 technical support number
  • To post as a guest, your comment is unpublished.
    Master Org · 1 years ago
    I think the world is going to end in within a couple of years...

    Be Prepare you stupid whore's shit
  • To post as a guest, your comment is unpublished.
    Smithk908 · 2 years ago
    I was just seeking this info for some time. After six hours of continuous Googleing, at last I got it in your web site. I wonder what is the lack of Google strategy that don't rank this kind of informative websites in top of the list. Generally the top sites are full of garbage.
  • To post as a guest, your comment is unpublished.
    Smithd139 · 2 years ago
    Can you add a Blackberry template? This web page is tricky to read otherwise for those of us browsing with cell phones. Otherwise, in the event you can place a RSS link up, that would be good also. dgcddbfbdeddcgdc