I have a protected Excel sheet. It has form controls and I have assigned macros to them. I can enable comments on this sheet by using
.Protect DrawingObjects:=False
but this also allows any form controls to be deleted.
I could change the form controls to activeX controls but this would prevent Mac users using it.
Is there a way of enabling comments but protecting the form controls?
thanks
Is there a way of enabling comments but protecting the form controls?
Not that I know of. But you may come up with a workaround :) Like this:
Something like this may be put in the code of the form. commentCell
is the selected cell. Probably some check how many cells are selected can be added as well:
ActiveSheet.Unprotect Password:=sPassword
Range(commentCell.Address).AddComment
Range(commentCell.Address).Comment.Text Text:=MyComment
ActiveSheet.Protect Password:=sPassword
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.