Hi,
We can Show or Hide a comment using the Excel Menu.
Suppose I select a range on my Excel sheet. Say, there are 5 comments in that range: 4 of them are visible (Show comments) and 1 is hidden (Hide comments).
How can we write a VBA macro that will count the number of visible comments, and also the number of hidden comments?
What I am trying to do:
If there are more visible comments than hidden comments in the Selection, the macro will Hide them all.
If there are more (= or >) hidden comments in the Selection, the macro will Show them all.
So, my macro button will act as a toggle button, but what it will do depends on which type of comment is more numerous:
This will avoid the inconvenience of sometimes having to click the button twice to say, show all comments.
Thanks
Leon
We can Show or Hide a comment using the Excel Menu.
Suppose I select a range on my Excel sheet. Say, there are 5 comments in that range: 4 of them are visible (Show comments) and 1 is hidden (Hide comments).
How can we write a VBA macro that will count the number of visible comments, and also the number of hidden comments?
What I am trying to do:
If there are more visible comments than hidden comments in the Selection, the macro will Hide them all.
If there are more (= or >) hidden comments in the Selection, the macro will Show them all.
So, my macro button will act as a toggle button, but what it will do depends on which type of comment is more numerous:
- If most or all comments are visible, hide them all.
- If most or all comments are hidden, show them all.
This will avoid the inconvenience of sometimes having to click the button twice to say, show all comments.
Thanks
Leon