vba hide comments on worksheet in Excel
Q146.How can I hide all comments in my WorkSheet using VBA?
For example, I have a WorkSheet with lot of comments - under certain circumstances, I would like to "Hide" all comments.
To do it in Excel, here is the answer:
- Public Sub ChangeDisplayStyle()
- Application.DisplayCommentIndicator = xlCommentIndicatorOnly
- End Sub
a) Running the above macro will hide all comments in the entire WorkBook.
b) To show all comments back again, "Application.DisplayCommentIndicator = xlCommentAndIndicator" can be used.
Result after Macro execution: