Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
The Tuner
 
Posts: n/a
Default Insert comment in protected worksheet

What are the correct settings that will allow a user to insert a cell comment
in an unprotected cell of a protected worksheet? When the worksheet is
protected, the insert comment function is not available (greyed out).
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

You could have the user run this macro. The major drawback is that if a user
wishes to edit an existing comment, they can't. They'd have to insert a new
comment over the old one:

Sub InsertComment()
Dim strPassword As String
Dim strCommText As String
Dim strMsg As String
Dim strMsg2 As String
Dim nMsgResp As Long
Dim strOldComm As String

strPassword = "apple" 'change to your password
strMsg = "Comment already in cell! Do you want to insert a new comment?"
strMsg2 = "Insert text for comment in "

With ActiveCell
If Not .Comment Is Nothing Then
strOldComm = .Comment.Text
nMsgResp = MsgBox(strMsg, vbYesNo)
If nMsgResp = vbYes Then
.Comment.Delete
GoTo NewComment
Else
Exit Sub
End If
Else
NewComment:
strCommText = InputBox(strMsg2 & .Address(False, False) & ":")
ActiveSheet.Unprotect Password:=strPassword
.AddComment
If strCommText = "" Then
.Comment.Text Text:=strOldComm
Else
.Comment.Text Text:=strCommText
ActiveSheet.Protect Password:=strPassword
End If
End If
End With

End Sub

---
HTH
Jason
Atlanta, GA


"The Tuner" wrote:

What are the correct settings that will allow a user to insert a cell comment
in an unprotected cell of a protected worksheet? When the worksheet is
protected, the insert comment function is not available (greyed out).

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you allow the users to "Edit objects"

In xl2002+
Tools|protect|protect sheet
there's a list of things that you want to allow the users to do.

If you check "edit objects", then they can insert comments (and do other things
to other objects--pictures, buttons...)

In xl2k and before, I think there's an checkbox on that dialog.

The Tuner wrote:

What are the correct settings that will allow a user to insert a cell comment
in an unprotected cell of a protected worksheet? When the worksheet is
protected, the insert comment function is not available (greyed out).


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 Conditional formats and insert comment - ajit Ajit Munj Excel Discussion (Misc queries) 7 June 4th 05 05:39 AM
Import/Export XML in protected worksheet jgentillet Excel Discussion (Misc queries) 0 May 13th 05 05:42 PM
MY WORKBOOK WON'T LET INSERT ANOTHER WORKSHEET. jlf Excel Worksheet Functions 1 March 30th 05 07:18 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
insert worksheet gives me 3 duplicate sheets not one boilerhouse Excel Discussion (Misc queries) 1 December 8th 04 04:35 PM


All times are GMT +1. The time now is 11:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"