F
Francis Hookham
I have seen Debra's Contextures - Comments which helped with the following
Sub CommentAdd()
Dim cmt As Comment
Set cmt = ActiveCell.Comment
If cmt Is Nothing Then
Set cmt = ActiveCell.AddComment
cmt.Text Text:=""
End If
With cmt.Shape.TextFrame.Characters.Font
.name = "Arial"
.Size = 12
.Bold = False
.ColorIndex = 0
End With
cmt.Visible = True
cmt.Shape.Select
End Sub
which leaves the comment open so I am using the following to close it
Sub CommentHide()
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub
OK but I should likea toggle button like the Reviewing Show/Hide all
comments button which would sence that there is one comment showing and
close it. Someting like this (which does not work)
Sub CommentHideShow()
If ActiveSheet.Comments.Visible = True Then
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
Else
ActiveSheet.Comments.Visible = True
End If
End Sub
Any ideas please and thanks
Francis Hookham
Sub CommentAdd()
Dim cmt As Comment
Set cmt = ActiveCell.Comment
If cmt Is Nothing Then
Set cmt = ActiveCell.AddComment
cmt.Text Text:=""
End If
With cmt.Shape.TextFrame.Characters.Font
.name = "Arial"
.Size = 12
.Bold = False
.ColorIndex = 0
End With
cmt.Visible = True
cmt.Shape.Select
End Sub
which leaves the comment open so I am using the following to close it
Sub CommentHide()
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub
OK but I should likea toggle button like the Reviewing Show/Hide all
comments button which would sence that there is one comment showing and
close it. Someting like this (which does not work)
Sub CommentHideShow()
If ActiveSheet.Comments.Visible = True Then
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
Else
ActiveSheet.Comments.Visible = True
End If
End Sub
Any ideas please and thanks
Francis Hookham