allow insert of comments but not moving of charts?

joeq

Board Regular
Joined
May 31, 2003
Messages
109
I know that by protecting the workbook and specifying EDIT OBJECTS the user is still allowed to insert a comment. but here's my questions....

1. Is there a way to allow only the VBA code to insert comments, but not the user?

2. This one may be asnswered by answering #1 - is there a way to allow the VBA code to insert comments in such as way that will prevent the user from being able to move my charts around? ;(

EDIT OBJECT seems to be a loaf of bread, but I only want to buy a few slices ;)

thanks, joe
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
1. Is there a way to allow only the VBA code to insert comments, but not the user?
Hi,

within code you can
1. unprotect your sheet
2. add the comment
3. protect the sheet

Code:
Sub test()
ActiveSheet.Unprotect "password"
Range("A1").Cells.NoteText "comment generated by macro ""test"""
ActiveSheet.Protect "password"
End Sub
kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,226,240
Messages
6,189,822
Members
453,572
Latest member
mrjohn500

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top