IF you want to toggle Comment box to Visible/Hide ,you can use this Code :
Sub ToggleComments()
On Error Resume Next
Dim count As Integer
count = ActiveSheet.Comments.count
If count = 0 Then MsgBox "There is no comment"
If Application.DisplayCommentIndicator = xlCommentAndIndicator Then
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
Else
Application.DisplayCommentIndicator = xlCommentAndIndicator
End If
End Sub
Sub ToggleComments()
On Error Resume Next
Dim count As Integer
count = ActiveSheet.Comments.count
If count = 0 Then MsgBox "There is no comment"
If Application.DisplayCommentIndicator = xlCommentAndIndicator Then
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
Else
Application.DisplayCommentIndicator = xlCommentAndIndicator
End If
End Sub
No comments:
Post a Comment