show/hide comments

D

Dal

Hi,

i've got comments on my worksheet and was wandering if there is a way to
show/hide comments through a command button or by assigning a macro to an
image. I know that you can easily do this by select show/hide comments on the
toolbar but as the users of my spreadsheet know nothing about excel i've been
told to include this in the actual spreadsheet.

Thanks in advance
 
D

Dave Peterson

Record a macro when you do this manually (one for show and one for hide).

Then plop a couple of buttons from the Forms toolbar onto your worksheet and
assign the macros to the buttons.
 
M

Mike H

Hi,

Put a button on your sheet then add this code to it to toggle the comments
on/off.

Sub Button1_Click()
If Application.DisplayCommentIndicator = xlCommentIndicatorOnly Then
Application.DisplayCommentIndicator = xlCommentAndIndicator
Else
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End If
End Sub


Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top