Forum Discussion

Ko Lay's avatar
Ko Lay
Copper Contributor
Sep 05, 2018
Solved

Excel default comment setting

Hi,  I couldn't find how to change the default setting for comment in excel (Office 2016).   Please help. Thank you.  
  • JKPieterse's avatar
    JKPieterse
    Sep 07, 2018

    This example macro formats a comment as a diamond shape with a red border:

    Sub AddAndFormatComment()
        With ActiveCell
            If .Comment Is Nothing Then
                .AddComment
                .Comment.Text Text:=Application.UserName & Chr(10) & ""
            End If
            With .Comment.Shape
                .AutoShapeType = msoShapeDiamond
                .Line.ForeColor.RGB = vbRed
            End With
            With .Font
                .Name = "Tahoma"
                .Size = 10
            End With
        End With
    End Sub
    

Resources