PDA

View Full Version : Solved: INSERT CELL COMMENTS IN PROTECTED SHEET



BENSON
10-03-2007, 01:37 AM
Is it possible to allow a user to insert cell comments on a protected worksheet?

THANKS

mdmackillop
10-03-2007, 02:22 AM
You'll need to create a macro to open an inputbox for the comment, unprotect the sheet, add the comment and then reprotect.

rory
10-03-2007, 04:41 AM
Or use the UserInterfaceOnly:=True argument and protect the workbook in the Workbook_Open event - then your code can run freely on the worksheet without having to unprotect and reprotect the sheet.

johnske
10-03-2007, 04:58 AM
or for the worsheet protection you can use protect scenarios and contents only (i.e. leave 'objects' unchecked)

zoom38
10-15-2007, 04:35 PM
Hello all, I would also like to be able to access the comment tools on a protected sheet but am unable to do so.

Rory I tried your way but it doesn't allow access to comments. I used the following:

For Each wksh In Worksheets
wksh.Activate
Range("a1").Select
wksh.Protect password:="pword", userinterfaceonly:=True
Next wksh


I also tried:

wksh.Protect password:="pword", drawingobjects:=false

and

wksh.Protect password:="pword", scenarios:=false


But these lines unprotect everything.


Md, I didn't try your method with the input boxes. The only way I would like to use this method is to be able to add this to the menu that pops up when you right click. Is this possible?

Thanks
Gary

johnske
10-15-2007, 04:48 PM
try

wksh.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True

zoom38
10-15-2007, 05:52 PM
Thank you Jonske that worked. It works with "userinterfaceonly:=True" in or out. Should I put it in or leave it out?

Thanks
Gary