Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Tools/Customize question - toggle Show/Hide Comments without a macro

This might be the wrong forum for this post, but if anyone knows the
answer to this, I think it will be someone in this group.

In Excel 2003 I can drag-create a button from Tools/Customize/Commands/
View/Comments

I find this button quite useful for toggling the display of comments.
However, it also makes the "Reviewing" toolbar visible when comments
are made visible, and then doesn't hide it when comments are turned
off.

Is there a way prevent the Reviewing toolbar from appearing at all, or
to hide it when comments are turned off?

The following "one-liner" is an ok workaround, but it would be really
nice to be able to do this without a macro.

Sub ShowHideComments()
Application.DisplayCommentIndicator = -1 *
Application.DisplayCommentIndicator
End Sub

Thanks,

Brian Murphy
Austin, Texas
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Tools/Customize question - toggle Show/Hide Comments without a macro

Brian,

Use the comments button you created and assign the following code to it...
(Tools | Customize and right-click the button)
'--
Sub UnderControl()
If Application.DisplayCommentIndicator < 1 Then
Application.CommandBars("Reviewing").Visible = False
Application.DisplayCommentIndicator = 1
Else
Application.DisplayCommentIndicator = -1
End If
End Sub

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)





wrote in message
This might be the wrong forum for this post, but if anyone knows the
answer to this, I think it will be someone in this group.

In Excel 2003 I can drag-create a button from Tools/Customize/Commands/
View/Comments
I find this button quite useful for toggling the display of comments.
However, it also makes the "Reviewing" toolbar visible when comments
are made visible, and then doesn't hide it when comments are turned off.
Is there a way prevent the Reviewing toolbar from appearing at all, or
to hide it when comments are turned off?

The following "one-liner" is an ok workaround, but it would be really
nice to be able to do this without a macro.

Sub ShowHideComments()
Application.DisplayCommentIndicator = -1 *
Application.DisplayCommentIndicator
End Sub

Thanks,
Brian Murphy
Austin, Texas
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Tools/Customize question - toggle Show/Hide Comments without amacro

Thanks for the reply, Jim.

I actually was already using my "one-liner" macro. What I was looking
for was a "non-macro" way to do the same thing.

I think your reply confirms that a macro is the only way.

Cheers,

Brian

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Toggle show / hide group outline symbols with shortcut Ted M H Excel Discussion (Misc queries) 7 April 23rd 23 07:44 PM
using a toggle button to show or hide information in several cells hanson Excel Worksheet Functions 3 December 7th 07 10:16 PM
Can value at A1 toggle hide/show of row 2? kj Excel Programming 2 February 16th 05 04:22 AM
Toggle Hide/Show Peter Atherton[_29_] Excel Programming 0 January 29th 04 06:51 PM
Toggle Hide/Show Bob Phillips[_6_] Excel Programming 0 January 29th 04 04:12 PM


All times are GMT +1. The time now is 01:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"