Suppose you have a workbook with a ton of cell comments, but you want to give a copy to someone without all the comments. Here's some simple code to remove all comments from a workbook. In this case, I assume it the ActiveWorkbook.

VBA Code

Sub DeleteAllComments()

    On Error GoTo ErrMsg:

    For Each ws In ActiveWorkbook.Sheets
        ws.Cells.ClearComments
    Next ws

    MsgBox "Done!", vbInformation, "DeleteAllComments()"

ExitHere:

    Exit Sub

ErrMsg:
    MsgBox Err.Number & ": " & Err.Description, _
           vbExclamation, "DeleteAllComments()"
    GoTo ExitHere

End Sub

Links