更新时间:2023-02-08 14:40:18
尝试这样:
Sub showcomments()
Comments = 1
For Each MyComments In ActiveSheet.Comments
If MyComments.Visible = True Then
Comments = 0
End If
Next
If Comments = 1 Then
Application.DisplayCommentIndicator = xlCommentAndIndicator
Else
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End If
End Sub